File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,10 @@ func! s:ParseOneLine(line) abort
206206 call s: MakeParagraph ()
207207 call s: ParseOneLine (a: line )
208208 else
209- if (s: pre_ln == -1 ) || (lnum == s: pre_ln + 1 )
209+ if ctrlsf#opt#IsContextZero ()
210+ call add (s: buffer , [fname, lnum, content])
211+ call s: MakeParagraph ()
212+ elseif (s: pre_ln == -1 ) || (lnum == s: pre_ln + 1 )
210213 let s: pre_ln = lnum
211214 call add (s: buffer , [fname, lnum, content])
212215 else
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ func! ctrlsf#opt#GetOpt(name) abort
7878 endif
7979endf
8080
81+ function ! ctrlsf#opt#IsContextZero ()
82+ let context = ctrlsf#opt#GetContext ()
83+ return (has_key (context, ' context' ) && context.context == 0 )
84+ endfunction
85+
8186" GetContext()
8287"
8388" Return a dict contains 'after', 'before' and/or 'context'
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ func! s:NormalViewIncr(base_vlnum) abort
129129 if s: cur_file !=# par.filename
130130 let s: cur_file = par.filename
131131 call extend (view , s: Filename (par))
132- else
132+ elseif ! ctrlsf#opt#IsContextZero ()
133133 call extend (view , s: Ellipsis ())
134134 endif
135135
@@ -367,6 +367,9 @@ func! ctrlsf#view#Unrender(content) abort
367367 let lnum = base_lnum + len (buffer ) + offset
368368 let content = strpart (line , indent )
369369 call add (buffer , [current_file, lnum, content])
370+ if ctrlsf#opt#IsContextZero ()
371+ break
372+ endif
370373 endif
371374 endwh
372375
You can’t perform that action at this time.
0 commit comments