Skip to content

Commit

Permalink
Custom offsets provider support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Oct 15, 2019
1 parent c10b4c3 commit 368ad25
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/kotlin/org/acejump/search/Finder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Int>,
model: AceFindModel = AceFindModel("", true)
) {
if (!skim) tag(model, results)
markup(Tagger.markers, model)
}
Expand Down

0 comments on commit 368ad25

Please sign in to comment.