Store some vim state per-editor

This fixes a bug where opening and closing command would reset your
selection incorrectly.
This commit is contained in:
Conrad Irwin
2023-08-17 14:09:47 -06:00
parent d308c91020
commit 3514816ece
12 changed files with 106 additions and 48 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ impl ModeIndicator {
if settings::get::<VimModeSetting>(cx).0 {
mode_indicator.mode = cx
.has_global::<Vim>()
.then(|| cx.global::<Vim>().state.mode);
.then(|| cx.global::<Vim>().state().mode);
} else {
mode_indicator.mode.take();
}
@@ -46,7 +46,7 @@ impl ModeIndicator {
.has_global::<Vim>()
.then(|| {
let vim = cx.global::<Vim>();
vim.enabled.then(|| vim.state.mode)
vim.enabled.then(|| vim.state().mode)
})
.flatten();