Upgrade Tree-sitter and limit query cursors' concurrently-buffered matches

This commit is contained in:
Max Brunsfeld 2022-07-08 14:08:35 -07:00
parent a82e56918e
commit 1f16c68e6b
4 changed files with 10 additions and 9 deletions

View file

@ -2393,12 +2393,12 @@ impl<'a> Iterator for BufferChunks<'a> {
impl QueryCursorHandle {
pub(crate) fn new() -> Self {
QueryCursorHandle(Some(
QUERY_CURSORS
.lock()
.pop()
.unwrap_or_else(|| QueryCursor::new()),
))
let mut cursor = QUERY_CURSORS
.lock()
.pop()
.unwrap_or_else(|| QueryCursor::new());
cursor.set_match_limit(64);
QueryCursorHandle(Some(cursor))
}
}