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.

Hide blinking cursor when window is deactivated (#15408)

Jason Lee0c8b17d2523d
diff --git a/crates/editor/src/blink_manager.rs b/crates/editor/src/blink_manager.rs
index e3a8ce6293c..9d828c4de98 100644
--- a/crates/editor/src/blink_manager.rs
+++ b/crates/editor/src/blink_manager.rs
@@ -98,6 +98,7 @@ impl BlinkManager {
}
pub fn disable(&mut self, _cx: &mut ModelContext<Self>) {
+ self.visible = false;
self.enabled = false;
}
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index db2eec8a1ec..2a3fbabb7fb 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -1884,7 +1884,6 @@ impl Editor {
if active {
blink_manager.enable(cx);
} else {
- blink_manager.show_cursor(cx);
blink_manager.disable(cx);
}
});