Fix lint: ignore flatpak in biome, fix search cursor iterator usage

This commit is contained in:
Gregory Schier
2026-02-12 15:34:13 -08:00
parent 9e1a11de0b
commit ae943a5fd2
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -47,7 +47,8 @@
"!src-web/vite.config.ts", "!src-web/vite.config.ts",
"!src-web/routeTree.gen.ts", "!src-web/routeTree.gen.ts",
"!packages/plugin-runtime-types/lib", "!packages/plugin-runtime-types/lib",
"!**/bindings" "!**/bindings",
"!flatpak"
] ]
} }
} }
@@ -51,9 +51,10 @@ export function searchMatchCount(): Extension {
let currentIndex = 0; let currentIndex = 0;
const MAX_COUNT = 9999; const MAX_COUNT = 9999;
const cursor = query.getCursor(state); const cursor = query.getCursor(state);
while (!cursor.next().done) { for (let result = cursor.next(); !result.done; result = cursor.next()) {
count++; 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; currentIndex = count;
} }
if (count > MAX_COUNT) break; if (count > MAX_COUNT) break;