chore(code/find): update current found

This commit is contained in:
Elian Doran
2025-05-12 20:43:30 +03:00
parent e08011b3d6
commit e5417827f4
3 changed files with 21 additions and 22 deletions

View File

@@ -31,17 +31,12 @@ export default class FindInCode {
}
async performFind(searchTerm: string, matchCase: boolean, wholeWord: boolean) {
let totalFound = 0;
const currentFound = 0;
const codeEditor = await this.getCodeEditor();
if (!codeEditor) {
return { totalFound, currentFound };
return { totalFound: 0, currentFound: 0 };
}
const result = await codeEditor.performFind(searchTerm, matchCase, wholeWord);
totalFound = result.totalFound;
const { totalFound, currentFound } = await codeEditor.performFind(searchTerm, matchCase, wholeWord);
return { totalFound, currentFound };
}