Minor fixes
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,2 +1,3 @@
|
|||||||
/libs/cjson/** linguist-vendored
|
/libs/cjson/** linguist-vendored
|
||||||
/libs/unicode_width/** linguist-vendored
|
/libs/unicode_width/** linguist-vendored
|
||||||
|
*.scm linguist-language=tree-sitter-query
|
||||||
|
|||||||
@@ -185,14 +185,14 @@ void ts_collect_spans(Editor *editor) {
|
|||||||
return;
|
return;
|
||||||
std::vector<TSInputEdit> edits;
|
std::vector<TSInputEdit> edits;
|
||||||
TSInputEdit edit;
|
TSInputEdit edit;
|
||||||
if (copy) {
|
if (copy)
|
||||||
while (editor->edit_queue.pop(edit)) {
|
while (editor->edit_queue.pop(edit)) {
|
||||||
edits.push_back(edit);
|
edits.push_back(edit);
|
||||||
ts_tree_edit(copy, &edits.back());
|
ts_tree_edit(copy, &edits.back());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
tree = ts_parser_parse(editor->parser, copy, tsinput);
|
tree = ts_parser_parse(editor->parser, copy, tsinput);
|
||||||
ts_tree_delete(copy);
|
if (copy)
|
||||||
|
ts_tree_delete(copy);
|
||||||
while (editor->edit_queue.pop(edit)) {
|
while (editor->edit_queue.pop(edit)) {
|
||||||
edits.push_back(edit);
|
edits.push_back(edit);
|
||||||
ts_tree_edit(tree, &edits.back());
|
ts_tree_edit(tree, &edits.back());
|
||||||
|
|||||||
Reference in New Issue
Block a user