From c6ad667d492ce8a17ed7580e8abcb6963b37262a Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sat, 26 Mar 2022 18:38:00 -0600 Subject: [PATCH] Assign normal mode when re-enabling --- crates/vim/src/vim.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index c6905a9c7a51f..26f7e24cf29bc 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -65,6 +65,9 @@ impl VimState { fn set_enabled(&mut self, enabled: bool, cx: &mut MutableAppContext) { if self.enabled != enabled { self.enabled = enabled; + if enabled { + self.mode = Mode::Normal; + } self.sync_editor_options(cx); } }