diff --git a/crates/vim/src/editor_events.rs b/crates/vim/src/editor_events.rs index 12b90ec8e6213c12e7cfecacb1c3c77635457c7f..f9dfc588e12a0c9536c174ec3096d879f1ebf4b4 100644 --- a/crates/vim/src/editor_events.rs +++ b/crates/vim/src/editor_events.rs @@ -18,15 +18,11 @@ fn editor_created(EditorCreated(editor): &EditorCreated, cx: &mut MutableAppCont } fn editor_focused(EditorFocused(editor): &EditorFocused, cx: &mut MutableAppContext) { - let mode = if matches!(editor.read(cx).mode(), EditorMode::SingleLine) { - Mode::Insert - } else { - Mode::Normal - }; - Vim::update(cx, |state, cx| { state.active_editor = Some(editor.downgrade()); - state.switch_mode(mode, cx); + if editor.read(cx).mode() != EditorMode::Full { + state.switch_mode(Mode::Insert, cx); + } }); }