disable vim mode in non full editors

This commit is contained in:
Kay Simmons 2023-01-17 17:32:10 -08:00
parent 4746fb5936
commit c3518cefe8
2 changed files with 3 additions and 5 deletions

View file

@ -37,9 +37,7 @@ fn editor_focused(EditorFocused(editor): &EditorFocused, cx: &mut MutableAppCont
let editor_mode = editor.mode();
let newest_selection_empty = editor.selections.newest::<usize>(cx).is_empty();
if editor_mode != EditorMode::Full {
vim.switch_mode(Mode::Insert, true, cx);
} else if !newest_selection_empty {
if editor_mode == EditorMode::Full && !newest_selection_empty {
vim.switch_mode(Mode::Visual { line: false }, true, cx);
}
});