]> 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)
committerEshel Yaron <me@eshelyaron.com>
Sat, 23 Dec 2023 13:17:13 +0000 (14:17 +0100)
commit4c7b091e00cfff0fb053d6eed2f9548f90a06983
treecc47529b212a7f720ed919265d21481d6513fe21
parent9c9d0d1baa853750adad110cbfc1c0259e5dc3a9
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.

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