]> git.eshelyaron.com Git - emacs.git/commit
Improve performance of treesit_cursor_helper_1
authorYuan Fu <casouri@gmail.com>
Thu, 31 Aug 2023 03:53:03 +0000 (20:53 -0700)
committerYuan Fu <casouri@gmail.com>
Thu, 31 Aug 2023 03:53:03 +0000 (20:53 -0700)
commitec4d29c4494f32acf0ff7c5632a1d951d957f084
treef97d9657fc9b69d4db29bc62271481d4639e3db3
parentf26622b2a470a6d9cfbabbaa96f6aa3966febf2f
Improve performance of treesit_cursor_helper_1

* src/treesit.c: (treesit_cursor_helper_1): Use
ts_tree_cursor_goto_first_child_for_byte to speed up traversing among
siblings.  The "while (ts_node_end_byte (cursor_node) < end_pos)" can
be removed with the check added in the loop below.
src/treesit.c