File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -361,10 +361,13 @@ function M.get(bufnr, winid)
361361 for _ , parent in ipairs (parents ) do
362362 local parent_start_row = parent :range ()
363363
364+ local num_context_lines = math.min (max_lines , contexts_height )
365+
364366 -- NOTE: this avoids covering up context by separator line
365- local separator_offset = config .separator and 1 or 0
367+ -- but is only needed when context is nontrivial of course
368+ local separator_offset = (num_context_lines > 0 and config .separator ) and 1 or 0
366369
367- local contexts_end_row = top_row + separator_offset + math.min ( max_lines , contexts_height )
370+ local contexts_end_row = top_row + separator_offset + num_context_lines
368371
369372 -- Only process the parent if it is not in view.
370373 if parent_start_row < contexts_end_row then
You can’t perform that action at this time.
0 commit comments