Invalidate tree's parent cache after an edit

This commit is contained in:
Max Brunsfeld 2018-07-10 14:00:31 -07:00
parent 83f88164aa
commit df3969e9d9
2 changed files with 15 additions and 0 deletions

View file

@ -41,6 +41,8 @@ const TSLanguage *ts_tree_language(const TSTree *self) {
void ts_tree_edit(TSTree *self, const TSInputEdit *edit) {
SubtreePool pool = ts_subtree_pool_new(0);
self->root = ts_subtree_edit(self->root, edit, &pool);
self->parent_cache_start = 0;
self->parent_cache_size = 0;
ts_subtree_pool_delete(&pool);
}