Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

vim: Hide mouse cursor on type (#27804)

Smit Barmase8f0bacddd89d
diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs
index 99ec321d572..45e6f5cfb6f 100644
--- a/crates/vim/src/vim.rs
+++ b/crates/vim/src/vim.rs
@@ -22,7 +22,7 @@ mod visual;
use anyhow::Result;
use collections::HashMap;
use editor::{
- Anchor, Bias, Editor, EditorEvent, EditorMode, EditorSettings, ToPoint,
+ Anchor, Bias, Editor, EditorEvent, EditorMode, EditorSettings, HideMouseCursorOrigin, ToPoint,
movement::{self, FindRange},
};
use gpui::{
@@ -767,6 +767,9 @@ impl Vim {
if let Some(action) = keystroke_event.action.as_ref() {
// Keystroke is handled by the vim system, so continue forward
if action.name().starts_with("vim::") {
+ self.update_editor(window, cx, |_, editor, _, _| {
+ editor.hide_mouse_cursor(&HideMouseCursorOrigin::MovementAction)
+ });
return;
}
} else if window.has_pending_keystrokes() || keystroke_event.keystroke.is_ime_in_progress()