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:
parent
d308c91020
commit
3514816ece
12 changed files with 106 additions and 48 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue