]> git.eshelyaron.com Git - emacs.git/commit
Fix an issue when searching subtree backward (bug#67117)
authorDenis Zubarev <dvzubarev@yandex.ru>
Sat, 11 Nov 2023 22:42:42 +0000 (01:42 +0300)
committerYuan Fu <casouri@gmail.com>
Tue, 19 Dec 2023 02:25:26 +0000 (18:25 -0800)
commit7b315e8a5c966f8d11a4f646db4e29b989b56ab1
tree46c8b7361d03583a3865165dde5e03c55cc877e8
parent03625c2fefa682f74775abc1e223e17557d58bc7
Fix an issue when searching subtree backward (bug#67117)

* src/treesit.c (treesit_traverse_child_helper):
Do not call treesit_traverse_sibling_helper when the named node is
required and the last child is the named node.
Otherwise treesit_traverse_sibling_helper will move cursor to the
previous sibling and last node will be skipped.
* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1):
Add tests.
src/treesit.c
test/src/treesit-tests.el