diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/treesit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/treesit.c b/src/treesit.c index 45de82ec096..04ea8958b96 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -3061,9 +3061,9 @@ treesit_traverse_child_helper (TSTreeCursor *cursor, | |||
| 3061 | /* First go to the last child. */ | 3061 | /* First go to the last child. */ |
| 3062 | while (ts_tree_cursor_goto_next_sibling (cursor)); | 3062 | while (ts_tree_cursor_goto_next_sibling (cursor)); |
| 3063 | 3063 | ||
| 3064 | if (!named) | 3064 | if (!named || (named && ts_node_is_named (ts_tree_cursor_current_node(cursor)))) |
| 3065 | return true; | 3065 | return true; |
| 3066 | /* Else named... */ | 3066 | /* Else named is required and last child is not named node */ |
| 3067 | if (treesit_traverse_sibling_helper(cursor, false, true)) | 3067 | if (treesit_traverse_sibling_helper(cursor, false, true)) |
| 3068 | return true; | 3068 | return true; |
| 3069 | else | 3069 | else |