Skip to content

Commit

Permalink
fixes acejump#179
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Mar 23, 2019
1 parent b6c24a2 commit 1609c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/acejump/control/Scroller.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Scroller {

// TODO: Why doesn't this work? https://github.com/acejump/AceJump/issues/179
private fun findPreviousPosition(): LogicalPosition? {
val prevIndex = textMatches.toList().dropLastWhile { it < viewBounds.first }
val prevIndex = textMatches.toList().dropLastWhile { it > viewBounds.first }
.lastOrNull() ?: textMatches.lastOrNull() ?: return null

val prevLogicalPosition = editor.offsetToLogicalPosition(prevIndex)
Expand Down

0 comments on commit 1609c12

Please sign in to comment.