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 cursor in embedded terminal when not focused (#52404)

Anas Limem49ed4dc3fe2b
diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index f3188f0f3ab..98b37eee576 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -754,7 +754,14 @@ impl TerminalView {
}
pub fn should_show_cursor(&self, focused: bool, cx: &mut Context<Self>) -> bool {
- // Always show cursor when not focused or in special modes
+ // Hide cursor when in embedded mode and not focused (read-only output like Agent panel)
+ if let TerminalMode::Embedded { .. } = &self.mode {
+ if !focused {
+ return false;
+ }
+ }
+
+ // For Standalone mode: always show cursor when not focused or in special modes
if !focused
|| self
.terminal