From: Yuan Fu Date: Wed, 26 Oct 2022 02:49:03 +0000 (-0700) Subject: * src/treesit.c (treesit_search_forward): Fix traverses algorithm. X-Git-Tag: emacs-29.0.90~1786 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c9df4cace0f88197e69ae45d18bfc1692eecca05;p=emacs.git * src/treesit.c (treesit_search_forward): Fix traverses algorithm. --- diff --git a/src/treesit.c b/src/treesit.c index 3ac0a0c7b2e..9136539b8b6 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -2504,7 +2504,7 @@ treesit_search_forward (TSNode *start, Lisp_Object pred, Lisp_Object parser, } /* We are at the next sibling, deep dive into the first leaf node. */ - TSNode next_next = ts_node_child (next, 0); + TSNode next_next = treesit_traverse_child_helper (next, forward, named); while (!ts_node_is_null (next_next)) { next = next_next;