cleanup of find in text implementation

This commit is contained in:
zadam
2023-05-18 13:41:32 +02:00
parent 1089e84f56
commit 074820dae5
4 changed files with 12 additions and 43 deletions

View File

@@ -8,19 +8,6 @@ export default class FindInText {
return this.parent.noteContext.getTextEditor();
}
async getInitialSearchTerm() {
const textEditor = await this.getTextEditor();
const selection = textEditor.model.document.selection;
const range = selection.getFirstRange();
// FIXME
for (const item of range.getItems()) {
// Fill in the findbox with the current selection if any
return item.data;
}
}
async performFind(searchTerm, matchCase, wholeWord) {
// Do this even if the searchTerm is empty so the markers are cleared and
// the counters updated