Make mode indicator follow vim enabled state

This commit is contained in:
Mikayla Maki committed 2023-07-27 16:14:56 -07:00
1 parent 9f5ffa2b6e
commit fb2c85ee9e
1 file changed
+5 -1
+5 -1
View File
@@ -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,