mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-04 07:34:03 +02:00
Use the read action to get the caret offset in EditorSelectionHandler
This commit is contained in:
parent
a5ac2e9ca7
commit
0b7c86fa7e
@ -590,9 +590,9 @@ internal object VimListenerManager {
|
||||
// and dragging left or vertically upwards, the last character prior to EOL
|
||||
// remains unselected. It's not clear why this happens, but this code fixes it.
|
||||
val caret = editor.caretModel.currentCaret
|
||||
val caretOffset = caret.offset
|
||||
val lineStart = ijVimEditor.getLineStartForOffset(caret.offset)
|
||||
val lineEnd = ijVimEditor.getLineEndForOffset(caret.offset)
|
||||
val caretOffset = ApplicationManager.getApplication().runReadAction<Int> { caret.offset }
|
||||
val lineStart = ijVimEditor.getLineStartForOffset(caretOffset)
|
||||
val lineEnd = ijVimEditor.getLineEndForOffset(caretOffset)
|
||||
val startOffset = selectionEvent.newRange.startOffset
|
||||
val endOffset = selectionEvent.newRange.endOffset
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user