Skip to content

Commit

Permalink
Restore only cursor position after edit is made to selection
Browse files Browse the repository at this point in the history
In case there exists a non empty selection,
  • Loading branch information
kiritsuku committed Sep 2, 2014
1 parent 755c791 commit 8c00baa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ object EditorUtils {
edit.apply(document)
val modifiedLength = document.getLength()-originalLength
val newOffset = textSelection.getOffset()+modifiedLength+lenAfterSelection+offsetInIntersection
new TextSelection(document, newOffset, textSelection.getLength())
new TextSelection(document, newOffset, 0)
}

} else {
Expand Down

0 comments on commit 8c00baa

Please sign in to comment.