# editor: Blink cursors only in the focused editor \(\#61086\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7d07d39f19d1ca56a5e1e3216d73f611ae7b5759

Requested commit: 7d07d39f19d1ca56a5e1e3216d73f611ae7b5759

Commit: 7d07d39f19d1ca56a5e1e3216d73f611ae7b5759

Tree: 514b41adfc0b4f02f338bfcf919ad04b02bf1191

Author: Daan De Meyer

Committer: GitHub

## Message

```
editor: Blink cursors only in the focused editor (#61086)

Every editor associated with a window observed window activation. The
handler enabled the blink manager for every editor, including hidden and
unfocused editors. Their independent 500 ms timers invalidated the
window out of phase and caused redundant full-window presents.

Window activation and deactivation are already represented as focus
transitions by GPUI: an inactive window has an empty effective focus
path. Remove the redundant activation observer and rely on the editor
focus and blur handlers to stop blinking on deactivation and restart it
only for the editor that owns focus on activation.

In a 40-second idle diagnostic run before this change, the steady-state
tail repeatedly contained invalidations from one or two editors per
frame. After the change, no unfocused-editor invalidations appeared.
Bounded scrollbar fades and visible activity animations remain
unchanged.

Add a regression test with focused and unfocused editors that covers
activation, deactivation, and reactivation.

Release Notes:

- Fixed cursors blinking in unfocused editors, reducing idle redraws.

---------

Signed-off-by: Daan De Meyer <daan@amutable.com>
```

## Parents

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

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