mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-10 18:00:17 +02:00
Fix lint: ignore flatpak in biome, fix search cursor iterator usage
This commit is contained in:
@@ -47,7 +47,8 @@
|
||||
"!src-web/vite.config.ts",
|
||||
"!src-web/routeTree.gen.ts",
|
||||
"!packages/plugin-runtime-types/lib",
|
||||
"!**/bindings"
|
||||
"!**/bindings",
|
||||
"!flatpak"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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