projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c1b9e6
)
* src/treesit.c (treesit_search_dfs): Fix traverse algorithm.
author
Yuan Fu
<casouri@gmail.com>
Wed, 26 Oct 2022 05:48:30 +0000
(22:48 -0700)
committer
Yuan Fu
<casouri@gmail.com>
Wed, 26 Oct 2022 05:48:30 +0000
(22:48 -0700)
src/treesit.c
patch
|
blob
|
history
diff --git
a/src/treesit.c
b/src/treesit.c
index 0f949b755427e9a68c4df6bb3aeca0293a96d74f..cd1af3f52d6b695df812e81be081c0f5dd45de6a 100644
(file)
--- a/
src/treesit.c
+++ b/
src/treesit.c
@@
-2455,7
+2455,8
@@
treesit_search_dfs (TSNode *root, Lisp_Object pred, Lisp_Object parser,
for (int offset = 0; offset < count; offset++)
{
uint32_t idx = forward ? offset : count - offset - 1;
- TSNode child = ts_node_child (node, idx);
+ TSNode child =
+ named ? ts_node_named_child (node, idx) : ts_node_child (node, idx);
if (!ts_node_is_null (child)
&& treesit_search_dfs (&child, pred, parser, named,