mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-09 07:14:47 -05:00
Fix lint: ignore flatpak in biome, fix search cursor iterator usage
This commit is contained in:
@@ -51,9 +51,10 @@ export function searchMatchCount(): Extension {
|
||||
let currentIndex = 0;
|
||||
const MAX_COUNT = 9999;
|
||||
const cursor = query.getCursor(state);
|
||||
while (!cursor.next().done) {
|
||||
for (let result = cursor.next(); !result.done; result = cursor.next()) {
|
||||
count++;
|
||||
if (cursor.value.from <= selection.from && cursor.value.to >= selection.to) {
|
||||
const match = result.value;
|
||||
if (match.from <= selection.from && match.to >= selection.to) {
|
||||
currentIndex = count;
|
||||
}
|
||||
if (count > MAX_COUNT) break;
|
||||
|
||||
Reference in New Issue
Block a user