1
0
mirror of https://github.com/chylex/IntelliJ-AceJump.git synced 2025-04-09 17:15:43 +02:00
This commit is contained in:
breandan.considine 2016-11-22 10:37:37 -05:00
parent a60614541c
commit fc83a3b5c8
6 changed files with 13 additions and 9 deletions
README.mdbuild.gradle
src/main
kotlin/com/johnlindquist/acejump
resources/META-INF

View File

@ -51,6 +51,8 @@ In order to build AceJump from the source, clone this repository and run `./grad
## History
- 3.0.7 No longer tags "folded" regions and minor alignment adjustments.
- 3.0.6 Fixes alignment issues, removes top and bottom alignments until there is a better way to visually differentiate adjacent tags.
- 3.0.5 Hotfix for target mode.
- 3.0.4 Adds "line mode" - press [Ctrl+Shift+;] to activate.
- 3.0.3 Updates to tag placement and performance improvements.

View File

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.0.5'
ext.kotlin_version = '1.0.5-2'
repositories {
mavenCentral()
@ -31,7 +31,7 @@ intellij {
}
group 'com.johnlindquist'
version '3.0.6'
version '3.0.7'
repositories {
mavenCentral()

View File

@ -158,7 +158,9 @@ class AceFinder(val findManager: FindManager, var editor: EditorImpl) {
var result = findManager.findString(fullText, startingFrom, findModel)
while (result.isStringFound && result.startOffset < windowEnd) {
indicesToCheck.add(result.startOffset)
if(!editor.foldingModel.isOffsetCollapsed(result.startOffset))
indicesToCheck.add(result.startOffset)
if (sitesToCheck.isNotEmpty()) {
if (!preexistingResults.hasNext()) break
else {
@ -239,7 +241,7 @@ class AceFinder(val findManager: FindManager, var editor: EditorImpl) {
*
* Tags *should* have the following properties:
*
* A. Should be as short as possible. A tag may be shortened later.
* A. Should be as short as possible. A tag may be "compacted" later.
* B. Should prefer keys that are physically closer to the last key pressed.
*/

View File

@ -42,7 +42,7 @@ class AceCanvas(val editor: EditorImpl) : JComponent() {
}
fun registerTag(point: Pair<Int, Int>, tag: String) {
(-1..(tag.length + 1)).forEach {
(-1..(tag.length)).forEach {
existingTags.add(Pair(point.first + it * fbm.fontWidth, point.second))
}
}

View File

@ -97,7 +97,8 @@ class JumpInfo(private val tag: String, var query: String, val index: Int,
val canAlignLeft = startOfThisLine < prevCharIndex - 1 && ac.isFree(left)
val isFirstCharacterOfLine = index == startOfThisLine
alignment = if (nextCharIsWhiteSpace) ALIGN_RIGHT
else if (isFirstCharacterOfLine) ALIGN_RIGHT
else if (isFirstCharacterOfLine)
ALIGN_RIGHT
else if (canAlignLeft)
ALIGN_LEFT
else if (canAlignRight)
@ -141,7 +142,7 @@ class JumpInfo(private val tag: String, var query: String, val index: Int,
fun highlightRemaining() {
g2d.color = yellow
val hasSpaceToTheRight = document.length <= index + tag.length ||
val hasSpaceToTheRight = document.length <= index + 1 ||
document[index + 1].isWhitespace()
if (alignment != ALIGN_RIGHT || hasSpaceToTheRight || isRegex)

View File

@ -9,8 +9,7 @@
Simply hit "ctrl+;", type a character, then type the matching character to Ace Jump. ]]>
</description>
<change-notes>Fixes alignment issues, removes top and bottom alignments
until there is a better way to visually differentiate adjacent tags.</change-notes>
<change-notes></change-notes>
<depends>com.intellij.modules.platform</depends>