chore(code/find): reintroduce total number of results

This commit is contained in:
Elian Doran
2025-05-12 19:35:07 +03:00
parent 749ae1b6b4
commit f2745d546b
3 changed files with 13 additions and 3 deletions

View File

@@ -176,6 +176,13 @@ export default class CodeMirror extends EditorView {
this.dispatch({
effects: this.searchHighlightCompartment.reconfigure(plugin)
});
// Wait for the plugin to activate in the next render cycle
await new Promise(requestAnimationFrame);
const instance = this.plugin(plugin); // TS workaround
return {
totalFound: instance?.totalFound ?? 0
}
}
async setMimeType(mime: string) {