Skip to content

Commit

Permalink
fix: avoid propagating empty context_lines
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
  • Loading branch information
Freyskeyd committed May 29, 2024
1 parent f62bfe1 commit 88ff0bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/treesitter-context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ local update = throttle(function()
return
end

assert(context_lines)
if not context_lines or #context_lines == 0 then
close()
return
end

open(bufnr, winid, context, context_lines)
end)
Expand Down

0 comments on commit 88ff0bb

Please sign in to comment.