mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-28 08:34:02 +02:00
Fix recursive runForEachCaret and a missing read action
This commit is contained in:
parent
e899a99313
commit
09321f409c
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) {
|
if (oldMode == Mode.INSERT) {
|
||||||
val undo = injector.undo as? VimTimestampBasedUndoService ?: return
|
val undo = injector.undo as? VimTimestampBasedUndoService ?: return
|
||||||
val nanoTime = System.nanoTime()
|
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>")
|
typeText("<BS><BS><BS>")
|
||||||
assertState("1ello world")
|
assertState("1ello world")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `backspace with replace modes`() {
|
||||||
|
configureByText("")
|
||||||
|
typeText("c<C-Home><Esc>.")
|
||||||
|
assertState("")
|
||||||
|
assertPluginError(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user