diff --git a/src/main/kotlin/org/acejump/search/Finder.kt b/src/main/kotlin/org/acejump/search/Finder.kt index 85e40f1b..2295732d 100644 --- a/src/main/kotlin/org/acejump/search/Finder.kt +++ b/src/main/kotlin/org/acejump/search/Finder.kt @@ -102,6 +102,21 @@ object Finder : Resettable { results = Scanner.findMatchingSites(editorText, model, results) }.let { logger.info("Found ${results.size} matching sites in $it ms") } + markResults(results, model) + } + + /** + * This method should not be inlined because it's used in IdeaVim integration plugin + * + * The default model is like that because if this function was called from + * the outer scope, it means that [results] are already collected and + * AceFindModel should be empty. Additionally, if + * AceFindModes.isRegex == true, only one symbol is highlighted in document. + */ + fun markResults( + results: SortedSet, + model: AceFindModel = AceFindModel("", true) + ) { if (!skim) tag(model, results) markup(Tagger.markers, model) }