mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
[Backport release-0.7] fix(treesitter): new iter if folded (#18990)
fix(treesitter): new iter if folded
(cherry picked from commit 8780076a78
)
Co-authored-by: kevinhwang91 <kevin.hwang@live.com>
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
05ce04e994
commit
ed9e6d19ab
@@ -267,7 +267,7 @@ local function on_line_impl(self, buf, line)
|
||||
-- Some injected languages may not have highlight queries.
|
||||
if not highlighter_query:query() then return end
|
||||
|
||||
if state.iter == nil then
|
||||
if state.iter == nil or state.next_row < line then
|
||||
state.iter = highlighter_query:query():iter_captures(root_node, self.bufnr, line, root_end_row + 1)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user