Skip to content

Commit

Permalink
Fix race condition resetting editor on focus gain
Browse files Browse the repository at this point in the history
Fixes VIM-3773
  • Loading branch information
citizenmatt authored and AlexPl292 committed Jan 14, 2025
1 parent 1105f61 commit 7548b16
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7548b16

Please # to comment.