Make mode indicator follow vim enabled state (#2802)

There was a minor visual bug introduced in
https://github.com/zed-industries/zed/pull/2801, this PR corrects it.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2023-07-27 16:30:49 -07:00 committed by GitHub
commit ae765bbca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,