emacs-31 1da79a162dd: ; * src/treesit.c (treesit_cursor_helper_1): Further explanation.
Eli Zaretskii <[email protected]> Tue, 28 Jul 2026 08:14:56 -0400 (EDT)
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit 1da79a162dd5a56458e6981b8ba831de9078e4cb Author: Yuan Fu <[email protected]> Commit: Eli Zaretskii <[email protected]> ; * src/treesit.c (treesit_cursor_helper_1): Further explanation. --- src/treesit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/treesit.c b/src/treesit.c index 210fae671b3..66644571f83 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -4263,7 +4263,7 @@ treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target, Also, ts_tree_cursor_goto_first_child_for_byte can't find zero-width nodes (which exist and are legit, e.g., markdown's block_continuation), because a zero-width node can't contain a pos - (end > pos). */ + (end > pos); instead, it'll falsely return the next child. */ if (!((start_pos != end_pos && ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) != -1) || ts_tree_cursor_goto_first_child (cursor)))