Don't show vim mode when disabled

This commit is contained in:
Conrad Irwin 2023-08-18 15:50:34 -06:00
parent 9dab6b6a20
commit 3ab3042e95

View File

@ -22,9 +22,11 @@ fn focused(EditorFocused(editor): &EditorFocused, cx: &mut AppContext) {
editor.window().update(cx, |cx| {
Vim::update(cx, |vim, cx| {
vim.set_active_editor(editor.clone(), cx);
cx.emit_global(VimEvent::ModeChanged {
mode: vim.state().mode,
});
if vim.enabled {
cx.emit_global(VimEvent::ModeChanged {
mode: vim.state().mode,
});
}
});
});
}