mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
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.
This commit is contained in:
parent
119390e7ce
commit
dc7ccd6bca
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user