aboutsummaryrefslogtreecommitdiff
path: root/src/tree_sitter/tree.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-28 18:41:49 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-12-22 10:35:00 +0100
commit79bd8d2ab6cae1c0be3233a9a7551d0b7bcc5944 (patch)
tree5335e3950295d4342322976a07a76d9a1a642ed9 /src/tree_sitter/tree.c
parent781c708c27816b07f1d20a333151886044534fab (diff)
downloadrneovim-79bd8d2ab6cae1c0be3233a9a7551d0b7bcc5944.tar.gz
rneovim-79bd8d2ab6cae1c0be3233a9a7551d0b7bcc5944.tar.bz2
rneovim-79bd8d2ab6cae1c0be3233a9a7551d0b7bcc5944.zip
tree-sitter: update vendored tree-sitter runtime
tree-sitter/tree-sitter commit edb569310005c66838b7d69fa60850acac6abeee Included files are: lib/include/tree-sitter/*.h lib/src/*.[ch] lib/src/unicode/* LICENSE
Diffstat (limited to 'src/tree_sitter/tree.c')
-rw-r--r--src/tree_sitter/tree.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tree_sitter/tree.c b/src/tree_sitter/tree.c
index 04cb1d242f..391fa7f592 100644
--- a/src/tree_sitter/tree.c
+++ b/src/tree_sitter/tree.c
@@ -84,12 +84,10 @@ void ts_tree_edit(TSTree *self, const TSInputEdit *edit) {
}
TSRange *ts_tree_get_changed_ranges(const TSTree *self, const TSTree *other, uint32_t *count) {
- TSRange *result;
TreeCursor cursor1 = {NULL, array_new()};
TreeCursor cursor2 = {NULL, array_new()};
- TSNode root = ts_tree_root_node(self);
- ts_tree_cursor_init(&cursor1, root);
- ts_tree_cursor_init(&cursor2, root);
+ ts_tree_cursor_init(&cursor1, ts_tree_root_node(self));
+ ts_tree_cursor_init(&cursor2, ts_tree_root_node(other));
TSRangeArray included_range_differences = array_new();
ts_range_array_get_changed_ranges(
@@ -98,6 +96,7 @@ TSRange *ts_tree_get_changed_ranges(const TSTree *self, const TSTree *other, uin
&included_range_differences
);
+ TSRange *result;
*count = ts_subtree_get_changed_ranges(
&self->root, &other->root, &cursor1, &cursor2,
self->language, &included_range_differences, &result