Include rows and columns in TSLength
This way, we don't have to have separate 1D and 2D versions for so many values
This commit is contained in:
parent
22c76fc71b
commit
d2bf88d5fe
14 changed files with 186 additions and 241 deletions
|
|
@ -53,7 +53,7 @@ void ts_document_edit(TSDocument *self, TSInputEdit edit) {
|
|||
if (!self->tree)
|
||||
return;
|
||||
|
||||
size_t max_chars = ts_tree_total_size(self->tree).chars;
|
||||
size_t max_chars = ts_tree_total_chars(self->tree);
|
||||
if (edit.position > max_chars)
|
||||
edit.position = max_chars;
|
||||
if (edit.chars_removed > max_chars - edit.position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue