neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit dc7ccd6bca81dfa6ade6462a6e30770c63d48266
parent 119390e7ce3fe4f4f3da8bdd963ea10ec8976a3a
Author: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date:   Tue, 12 Mar 2024 16:13:40 -0500

fix(treesitter): use 0 as initial value for computing maximum (#27837)

Using -1 as the initial value can cause the pattern offset to become
negative, which in turn results in a negative subpriority, which fails
validation in nvim_buf_set_extmark.
Diffstat:
Mruntime/lua/vim/treesitter/highlighter.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua @@ -270,7 +270,7 @@ local function on_line_impl(self, buf, line, is_spell_nav) :iter_matches(root_node, self.bufnr, line, root_end_row + 1, { all = true }) end - local max_pattern_index = -1 + local max_pattern_index = 0 while line >= state.next_row do local pattern, match, metadata = state.iter()