fix(lib): account for the root node of a tree cursor being an alias
This commit is contained in:
parent
24a68697ac
commit
09d2b23a64
7 changed files with 16 additions and 8 deletions
|
|
@ -102,8 +102,8 @@ TSRange *ts_tree_included_ranges(const TSTree *self, uint32_t *length) {
|
|||
}
|
||||
|
||||
TSRange *ts_tree_get_changed_ranges(const TSTree *old_tree, const TSTree *new_tree, uint32_t *length) {
|
||||
TreeCursor cursor1 = {NULL, array_new()};
|
||||
TreeCursor cursor2 = {NULL, array_new()};
|
||||
TreeCursor cursor1 = {NULL, array_new(), 0};
|
||||
TreeCursor cursor2 = {NULL, array_new(), 0};
|
||||
ts_tree_cursor_init(&cursor1, ts_tree_root_node(old_tree));
|
||||
ts_tree_cursor_init(&cursor2, ts_tree_root_node(new_tree));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue