mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fix(treesitter): compute folds on_changedtree only if not nil
This commit is contained in:
committed by
Lewis Russell
parent
0bc75ac78e
commit
f50f86b9ff
@ -387,7 +387,9 @@ function M.foldexpr(lnum)
|
||||
|
||||
parser:register_cbs({
|
||||
on_changedtree = function(tree_changes)
|
||||
on_changedtree(bufnr, foldinfos[bufnr], tree_changes)
|
||||
if foldinfos[bufnr] then
|
||||
on_changedtree(bufnr, foldinfos[bufnr], tree_changes)
|
||||
end
|
||||
end,
|
||||
|
||||
on_bytes = function(_, _, start_row, start_col, _, old_row, old_col, _, new_row, new_col, _)
|
||||
|
Reference in New Issue
Block a user