aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-11-05 21:47:33 -0800
committerLewis Russell <me@lewisr.dev>2025-11-06 09:27:21 +0000
commitf2bfde9140ca646db3e2b67b97b1e54b70408703 (patch)
tree8e9dfd2fbbdc7a68976be58e835d2dcb97c80de6 /runtime/lua/vim
parent39455a43634e43470dc1c88990f39241b95c3021 (diff)
downloadrneovim-f2bfde9140ca646db3e2b67b97b1e54b70408703.tar.gz
rneovim-f2bfde9140ca646db3e2b67b97b1e54b70408703.tar.bz2
rneovim-f2bfde9140ca646db3e2b67b97b1e54b70408703.zip
fix(treesitter): reset next_col when performing intermediate highlights
The iterator is meant to be fully reset in this code path, but only the `next_row` state was being reset. This would only cause highlight artifacts for very brief periods of time, though.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/treesitter/highlighter.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua
index c69d830cda..9bfbd04cba 100644
--- a/runtime/lua/vim/treesitter/highlighter.lua
+++ b/runtime/lua/vim/treesitter/highlighter.lua
@@ -570,6 +570,7 @@ function TSHighlighter._on_win(_, win, buf, topline, botline)
-- trees upon parsing a different region.
state.iter = nil
state.next_row = 0
+ state.next_col = 0
end)
end
local hl_states = self._highlight_states[win] or {}