Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys
This commit is contained in:
parent
2ee57c1512
commit
66486870aa
12 changed files with 198 additions and 42 deletions
|
@ -29,8 +29,17 @@ fn editor_focused(EditorFocused(editor): &EditorFocused, cx: &mut MutableAppCont
|
|||
}
|
||||
}));
|
||||
|
||||
if editor.read(cx).mode() != EditorMode::Full {
|
||||
vim.switch_mode(Mode::Insert, cx);
|
||||
if !vim.enabled {
|
||||
return;
|
||||
}
|
||||
|
||||
let editor = editor.read(cx);
|
||||
if editor.selections.newest::<usize>(cx).is_empty() {
|
||||
if editor.mode() != EditorMode::Full {
|
||||
vim.switch_mode(Mode::Insert, cx);
|
||||
}
|
||||
} else {
|
||||
vim.switch_mode(Mode::Visual { line: false }, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue