]> git.eshelyaron.com Git - emacs.git/commit
Fix infinite loop in treesit-search-forward-goto
authorYuan Fu <casouri@gmail.com>
Sun, 23 Oct 2022 05:50:56 +0000 (22:50 -0700)
committerYuan Fu <casouri@gmail.com>
Sun, 23 Oct 2022 05:50:56 +0000 (22:50 -0700)
commit57b904f4bab7aea7ddb9d3b36229008a47b32ff1
tree5ab9db49958da90805b2f1fc05f7ff83deb4b359
parent773cce640fc5d67cb1a64622defa073d7ec5fcc4
Fix infinite loop in treesit-search-forward-goto

* lisp/treesit.el (treesit-search-forward-goto): Remove UP argument.
* src/treesit.c (treesit_traverse_child_helper): New function.
(treesit_search_forward): Remove UP_ONLY and SKIP_START argument.
Don't traverse subtree of START.  And after we've found the next
sibling/parent, go down to the first leaf node.  Also change recursion
to loop.
(Ftreesit_search_forward): Change docstring, remove UP argument.
doc/lispref/parsing.texi
lisp/treesit.el
src/treesit.c