Skip to content

Commit 8780076

Browse files
kevinhwang91bfredl
authored andcommitted
fix(treesitter): new iter if folded
1 parent 35c9fe9 commit 8780076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/lua/vim/treesitter/highlighter.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ local function on_line_impl(self, buf, line)
279279
return
280280
end
281281

282-
if state.iter == nil then
282+
if state.iter == nil or state.next_row < line then
283283
state.iter = highlighter_query:query():iter_captures(root_node, self.bufnr, line, root_end_row + 1)
284284
end
285285

0 commit comments

Comments
 (0)