disable vim mode in non full editors
This commit is contained in:
parent
4746fb5936
commit
c3518cefe8
2 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue