mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
Correct cursor range in Ftreesit_query_capture (bug#81297)
* src/treesit.c (Ftreesit_query_capture): Always explicitly set cursor's range.
This commit is contained in:
parent
a057a32bf9
commit
5dd8fe25c2
|
|
@ -4106,6 +4106,12 @@ the query. */)
|
|||
(uint32_t) (beg_byte - visible_beg),
|
||||
(uint32_t) (end_byte - visible_beg));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If range is unbounded, set it explicitly, in case the cursor is
|
||||
reused and carries the range from last call. */
|
||||
ts_query_cursor_set_byte_range (cursor, 0, UINT32_MAX);
|
||||
}
|
||||
|
||||
/* Execute query. */
|
||||
ts_query_cursor_exec (cursor, treesit_query, treesit_node);
|
||||
|
|
|
|||
Loading…
Reference in a new issue