From c9df4cace0f88197e69ae45d18bfc1692eecca05 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 25 Oct 2022 19:49:03 -0700 Subject: [PATCH] * src/treesit.c (treesit_search_forward): Fix traverses algorithm. --- src/treesit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2