Skip to content

Commit ae943a5

Browse files
committed
Fix lint: ignore flatpak in biome, fix search cursor iterator usage
1 parent 9e1a11d commit ae943a5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"!src-web/vite.config.ts",
4848
"!src-web/routeTree.gen.ts",
4949
"!packages/plugin-runtime-types/lib",
50-
"!**/bindings"
50+
"!**/bindings",
51+
"!flatpak"
5152
]
5253
}
5354
}

src-web/components/core/Editor/searchMatchCount.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ export function searchMatchCount(): Extension {
5151
let currentIndex = 0;
5252
const MAX_COUNT = 9999;
5353
const cursor = query.getCursor(state);
54-
while (!cursor.next().done) {
54+
for (let result = cursor.next(); !result.done; result = cursor.next()) {
5555
count++;
56-
if (cursor.value.from <= selection.from && cursor.value.to >= selection.to) {
56+
const match = result.value;
57+
if (match.from <= selection.from && match.to >= selection.to) {
5758
currentIndex = count;
5859
}
5960
if (count > MAX_COUNT) break;

0 commit comments

Comments
 (0)