diff options
Diffstat (limited to 'src/nvim/lua/treesitter.c')
-rw-r--r-- | src/nvim/lua/treesitter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index c7999ac077..3e33fcd142 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -500,7 +500,8 @@ static int parser_parse(lua_State *L) // The new tree will be pushed to the stack, without copy, ownership is now to the lua GC. // Old tree is owned by lua GC since before uint32_t n_ranges = 0; - TSRange *changed = old_tree ? ts_tree_get_changed_ranges(old_tree, new_tree, &n_ranges) : NULL; + TSRange *changed = old_tree ? ts_tree_get_changed_ranges(old_tree, new_tree, &n_ranges) + : ts_tree_included_ranges(new_tree, &n_ranges); push_tree(L, new_tree); // [tree] |