1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-05-07 21:34:09 +02:00

Fix race condition resetting editor on focus gain

Fixes VIM-3773
This commit is contained in:
Matt Ellis 2025-01-14 12:55:36 +00:00 committed by Alex Pláte
parent 1105f61988
commit 7548b160ae

View File

@ -80,7 +80,9 @@ class IJEditorFocusListener : EditorListener {
if (ijEditor.isDisposed) return@invokeLater
val consoleView: ConsoleViewImpl? = ijEditor.getUserData(ConsoleViewImpl.CONSOLE_VIEW_IN_EDITOR_VIEW)
if (consoleView != null && consoleView.isRunning && !ijEditor.inInsertMode) {
// Switch to Insert mode, but make sure we reset the editor to actually make it apply
switchToInsertMode.run()
KeyHandler.getInstance().reset(editor)
}
}
KeyHandler.getInstance().reset(editor)