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.

Make mode indicator follow vim enabled state

Mikayla Maki03bc430bdd82
diff --git a/crates/vim/src/mode_indicator.rs b/crates/vim/src/mode_indicator.rs
index 84e3e5868a4..639a7594f11 100644
--- a/crates/vim/src/mode_indicator.rs
+++ b/crates/vim/src/mode_indicator.rs
@@ -44,7 +44,11 @@ impl ModeIndicator {
// Vim doesn't exist in some tests
let mode = cx
.has_global::<Vim>()
- .then(|| cx.global::<Vim>().state.mode);
+ .then(|| {
+ let vim = cx.global::<Vim>();
+ vim.enabled.then(|| vim.state.mode)
+ })
+ .flatten();
Self {
mode,