]> git.eshelyaron.com Git - emacs.git/commit
Call treesit_record_change in insert_from_gap_1
authorYuan Fu <casouri@gmail.com>
Fri, 3 Feb 2023 01:22:22 +0000 (17:22 -0800)
committerYuan Fu <casouri@gmail.com>
Fri, 3 Feb 2023 02:31:19 +0000 (18:31 -0800)
commit8a6bdf88b4b665916cf74dee3a30e9136a9b6df8
tree8deeefbb73149fdf3e5efd4a80321be98f62127e
parenta2b77c79dcca64b5e0ae58862206e7cc29640944
Call treesit_record_change in insert_from_gap_1

Before this change, insert_from_gap calls treesit_record_change but
insert_from_gap_1 doesn't.  However, insert_from_gap_1 is a public
function and is called in many other places outside of insdel.c.  This
could lead to tree-sitter's parse tree becoming out-of-sync with the
buffer content.

This change might fix bug#60650.

* src/insdel.c (insert_from_gap_1): Call treesit_record_change.
(insert_from_gap): Remove call to treesit_record_change.

* admin/notes/tree-sitter/treesit_record_change: New file.
admin/notes/tree-sitter/treesit_record_change [new file with mode: 0644]
src/insdel.c