Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Don't show vim mode when disabled

Conrad Irwin3ab3042e9589
diff --git a/crates/vim/src/editor_events.rs b/crates/vim/src/editor_events.rs
index f1b01f460d2..994a09aaf94 100644
--- a/crates/vim/src/editor_events.rs
+++ b/crates/vim/src/editor_events.rs
@@ -22,9 +22,11 @@ fn focused(EditorFocused(editor): &EditorFocused, cx: &mut AppContext) {
editor.window().update(cx, |cx| {
Vim::update(cx, |vim, cx| {
vim.set_active_editor(editor.clone(), cx);
- cx.emit_global(VimEvent::ModeChanged {
- mode: vim.state().mode,
- });
+ if vim.enabled {
+ cx.emit_global(VimEvent::ModeChanged {
+ mode: vim.state().mode,
+ });
+ }
});
});
}