# Hide cursor in embedded terminal when not focused \(\#52404\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/49ed4dc3fe2b547bf6508a855364ec53ec3fe76d)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 49ed4dc3fe2b547bf6508a855364ec53ec3fe76d

Requested commit: 49ed4dc3fe2b547bf6508a855364ec53ec3fe76d

Commit: 49ed4dc3fe2b547bf6508a855364ec53ec3fe76d

Tree: 1ad45136132772d3d37d2414a95e6ab552a278ee

Author: Anas Limem

Committer: GitHub

## Message

```
Hide cursor in embedded terminal when not focused (#52404)

## Context
Fixes #52063
This change hides the cursor in embedded terminal mode when not focused.
Embedded mode is used for read-only terminal output (like the Agent
panel). Showing a cursor in a read-only context when unfocused is
confusing, so we suppress it.
<img width="549" height="496" alt="Screenshot 2026-03-25 at 12 03 15"
src="https://github.com/user-attachments/assets/20b29c28-85a7-4f5e-87ea-acf47d15d506"
/>

## How to Review

The change is in a single file:
`crates/terminal_view/src/terminal_view.rs:754-761`.
Focus on the `should_show_cursor()` method 
Verify the logic correctly hides the cursor only when both conditions
are met (Embedded mode AND not focused).

## Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (N/A - no unsafe
code)
- [x] The content is consistent with the UI/UX checklist
- [x] Tests cover the new/changed behavior (behavior is minimal UI fix,
existing tests should cover)
- [x] Performance impact has been considered and is acceptable
(negligible)

Release Notes:

- Fixed cursor visibility issue in embedded terminal panels
```

## Parents

- [086060558f9c6cdb802deac64f2fbde243986bb6](https://git.cafe/gitcafe/zed/commit/086060558f9c6cdb802deac64f2fbde243986bb6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/49ed4dc3fe2b547bf6508a855364ec53ec3fe76d?format=markdown)
