Calculate the column and offset separately in TSNode

This commit is contained in:
joshvera 2015-11-25 13:36:19 -05:00
parent 1687d66776
commit 3d9a44d880
10 changed files with 66 additions and 52 deletions

View file

@ -85,7 +85,7 @@ void ts_document_invalidate(TSDocument *self) {
}
TSNode ts_document_root_node(const TSDocument *self) {
TSNode result = ts_node_make(self->tree, ts_length_zero(), ts_point_zero());
TSNode result = ts_node_make(self->tree, ts_length_zero(), 0);
while (result.data && !ts_tree_is_visible(result.data))
result = ts_node_named_child(result, 0);
return result;