; * src/treesit.c (treesit_cursor_helper_1): Further explanation.

This commit is contained in:
Yuan Fu 2026-07-28 03:13:28 -07:00 committed by Eli Zaretskii
parent 037076824f
commit 1da79a162d

View file

@ -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)))