We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4976d8b commit 938003cCopy full SHA for 938003c
lua/treesitter-context/context.lua
@@ -341,7 +341,11 @@ function M.get(bufnr, winid)
341
for parents, query in iter_context_parents(bufnr, line_range) do
342
for _, parent in ipairs(parents) do
343
local parent_start_row = parent:range()
344
- local contexts_end_row = top_row + math.min(max_lines, contexts_height)
+
345
+ -- NOTE: this avoids covering up context by separator line
346
+ local separator_offset = config.separator and 1 or 0
347
348
+ local contexts_end_row = top_row + separator_offset + math.min(max_lines, contexts_height)
349
350
-- Only process the parent if it is not in view.
351
if parent_start_row < contexts_end_row then
0 commit comments