mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-09-12 07:53:08 +02:00
Fix recursive runForEachCaret and a missing read action
This commit is contained in:
src
main
java
com
maddyhome
idea
vim
newapi
test
java
org
jetbrains
plugins
ideavim
action
@@ -542,7 +542,9 @@ internal class InsertTimeRecorder : ModeChangeListener {
|
||||
if (oldMode == Mode.INSERT) {
|
||||
val undo = injector.undo as? VimTimestampBasedUndoService ?: return
|
||||
val nanoTime = System.nanoTime()
|
||||
editor.forEachCaret { undo.endInsertSequence(it, it.offset, nanoTime) }
|
||||
injector.application.runReadAction {
|
||||
editor.nativeCarets().forEach { undo.endInsertSequence(it, it.offset, nanoTime) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1081,4 +1081,12 @@ foobaz
|
||||
typeText("<BS><BS><BS>")
|
||||
assertState("1ello world")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `backspace with replace modes`() {
|
||||
configureByText("")
|
||||
typeText("c<C-Home><Esc>.")
|
||||
assertState("")
|
||||
assertPluginError(false)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user