Skip to content

Commit

Permalink
Fixes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Jun 10, 2017
1 parent 5790e2b commit f72d604
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ To start an instance of IntelliJ IDEA with AceJump installed, run ` ./gradlew ru

## History

- 3.2.5 AceJump 3 now supports older IntelliJ Platform and Kotlin versions.
- 3.2.4 Tagging improvements (tags now shorter on average) and visual updates.
- 3.2.3 Fixes a critical issue affecting users with multiple editor windows open.
- 3.2.2 Adds scrolling support and fixes some line spacing issues.
Expand Down
8 changes: 2 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ buildscript {

plugins {
id("org.jetbrains.intellij") version "0.2.11"
}

apply {
plugin("org.jetbrains.intellij")
plugin("kotlin")
id("org.jetbrains.kotlin.jvm") version "1.1.2"
}

configure<IntelliJPluginExtension> {
Expand All @@ -27,4 +23,4 @@ configure<IntelliJPluginExtension> {
}

group = "com.johnlindquist"
version = "3.2.4"
version = "3.2.5"
10 changes: 2 additions & 8 deletions src/main/kotlin/com/johnlindquist/acejump/search/Finder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object Finder {
populateNgrams()

if (!findModel.isRegularExpressions || sitesToCheck.isEmpty()) {
sitesToCheck = editorText.findInRange(originalQuery)
sitesToCheck = editorText.findInRange(originalQuery).toList()
digraphs = makeMap(editorText, sitesToCheck)
}

Expand Down Expand Up @@ -197,7 +197,6 @@ object Finder {
*/

private fun mapDigraphs(digraphs: Multimap<String, Int>): BiMap<String, Int> {
val startTime = System.currentTimeMillis()
if (query.isEmpty()) return HashBiMap.create()

val newTagMap: BiMap<String, Int> = setupTagMap()
Expand Down Expand Up @@ -236,9 +235,7 @@ object Finder {
} && ((index + 1)..right).map {
// Never use a tag which can be partly completed by typing plaintext
editorText.substring(index, min(it, editorText.length)) + tag[0]
}.none {
editorText.findInRange(it).isNotEmpty()
}
}.none { editorText.contains(it) }
}

val tag = matching.firstOrNull()
Expand Down Expand Up @@ -271,9 +268,6 @@ object Finder {
tryToAssignTagToIndex(it)
}

val endTime = System.currentTimeMillis()
println("Total execution time for mapDigraphs(): " + (endTime - startTime) + "ms")

return newTagMap
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Simply hit "ctrl+;", type a character, then type the matching character to Ace Jump. ]]>
</description>
<change-notes>Tagging improvements (tags now shorter on average) and visual updates.</change-notes>
<change-notes>AceJump 3 now supports older IntelliJ Platform and Kotlin versions.</change-notes>

<depends>com.intellij.modules.platform</depends>

Expand Down

0 comments on commit f72d604

Please sign in to comment.