Clear QueryCursor state between exec calls
This commit is contained in:
parent
8eac81b8df
commit
322b311c2c
3 changed files with 6 additions and 0 deletions
|
|
@ -248,6 +248,9 @@ static CaptureListPool capture_list_pool_new() {
|
|||
|
||||
static void capture_list_pool_reset(CaptureListPool *self) {
|
||||
self->usage_map = UINT32_MAX;
|
||||
for (unsigned i = 0; i < 32; i++) {
|
||||
array_clear(&self->list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void capture_list_pool_delete(CaptureListPool *self) {
|
||||
|
|
|
|||
|
|
@ -143,6 +143,8 @@ pub extern "C" fn ts_tagger_tag(
|
|||
let tag = if let Ok(tag) = tag {
|
||||
tag
|
||||
} else {
|
||||
buffer.tags.clear();
|
||||
buffer.docs.clear();
|
||||
return TSTagsError::Timeout;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ impl TagsContext {
|
|||
self.parser
|
||||
.set_language(config.language)
|
||||
.map_err(|_| Error::InvalidLanguage)?;
|
||||
self.parser.reset();
|
||||
unsafe { self.parser.set_cancellation_flag(cancellation_flag) };
|
||||
let tree = self.parser.parse(source, None).ok_or(Error::Cancelled)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue