Preserve matches that contain the QueryCursor's start byte

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld 2021-05-25 13:06:24 -07:00
parent a61f25bc58
commit f597cc6a75
5 changed files with 214 additions and 171 deletions

View file

@ -809,11 +809,9 @@ void ts_query_cursor_exec(TSQueryCursor *, const TSQuery *, TSNode);
bool ts_query_cursor_did_exceed_match_limit(const TSQueryCursor *);
/**
* Get or set the range of bytes or (row, column) positions in which the query
* Set the range of bytes or (row, column) positions in which the query
* will be executed.
*/
void ts_query_cursor_byte_range(const TSQueryCursor *, uint32_t *, uint32_t *);
void ts_query_cursor_point_range(const TSQueryCursor *, TSPoint *, TSPoint *);
void ts_query_cursor_set_byte_range(TSQueryCursor *, uint32_t, uint32_t);
void ts_query_cursor_set_point_range(TSQueryCursor *, TSPoint, TSPoint);
@ -826,6 +824,8 @@ void ts_query_cursor_set_point_range(TSQueryCursor *, TSPoint, TSPoint);
bool ts_query_cursor_next_match(TSQueryCursor *, TSQueryMatch *match);
void ts_query_cursor_remove_match(TSQueryCursor *, uint32_t id);
void ts_query_cursor_advance_to_byte(TSQueryCursor *, uint32_t offset);
/**
* Advance to the next capture of the currently running query.
*