mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
; * src/treesit.c (treesit_cursor_helper_1): Fix last change.
This commit is contained in:
parent
5e3f68c669
commit
037076824f
|
|
@ -4261,12 +4261,12 @@ treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target,
|
|||
/* ts_tree_cursor_goto_first_child_for_byte is significantly faster,
|
||||
so despite it having problems (see bug#60127), we try it first.
|
||||
Also, ts_tree_cursor_goto_first_child_for_byte can't find
|
||||
zero-width nodes (which exists and are legit, e.g., markdown's
|
||||
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). */
|
||||
if (start_pos != end_pos
|
||||
&& ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) == -1
|
||||
&& !ts_tree_cursor_goto_first_child (cursor))
|
||||
if (!((start_pos != end_pos
|
||||
&& ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) != -1)
|
||||
|| ts_tree_cursor_goto_first_child (cursor)))
|
||||
return false;
|
||||
|
||||
/* Go through each sibling that could contain TARGET. Because of
|
||||
|
|
|
|||
Loading…
Reference in a new issue