]> git.eshelyaron.com Git - emacs.git/commit
Conservative heuristic for tree-sitter parser ranges (bug#73324)
authorYuan Fu <casouri@gmail.com>
Wed, 18 Sep 2024 04:17:13 +0000 (21:17 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Sep 2024 10:45:14 +0000 (12:45 +0200)
commit3e99658ee9e1a2f38d7fe793f64671b027fb7200
tree7569f51c0bffe7a09c35eb1d0b4e7f21879f464d
parent7c27fd669b32825babfab68c6c6221c6dbace60e
Conservative heuristic for tree-sitter parser ranges (bug#73324)

* src/treesit.c (treesit_sync_visible_region): If the parser's original
ranges don't overlap with visible region, give it a zero range, rather
than don't set any range.
* test/src/treesit-tests.el (treesit-range-fixup-after-edit): Test new
behavior.

(cherry picked from commit f0daa2f2153a9d250d32ac1261a6fffb30860e31)
src/treesit.c
test/src/treesit-tests.el