# Do not flicker when switching cmd-hovered words in terminal \(\#30098\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f7e77123cc89ffa65947f2dff2521d3b617f7173

Requested commit: f7e77123cc89ffa65947f2dff2521d3b617f7173

Commit: f7e77123cc89ffa65947f2dff2521d3b617f7173

Tree: d5244d26eb0abc9c8121346d1ab806a9b096e4b4

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Do not flicker when switching cmd-hovered words in terminal (#30098)

Closes https://github.com/zed-industries/zed/issues/25110


https://github.com/user-attachments/assets/4624c256-8dfb-48eb-a726-6cf130d946da

Terminal may update its hovered word way before reporting it to the
terminal view, and that processing the file check later.
Hence, store the terminal hover data in the terminal view and avoid
highlights when it's different from what the terminal has (as the source
of truth here).

In addition, now only does hover refreshes when the terminal hover
actually changes, not on every event report.

Release Notes:

- Fixed underline flicker when switching cmd-hovered words in terminal
```

## Parents

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

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