# Dismiss active diagnostics on invalidation \(\#25646\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d2b49de0e4f575c4b3e56b6208f465864e55d3fd

Requested commit: d2b49de0e4f575c4b3e56b6208f465864e55d3fd

Commit: d2b49de0e4f575c4b3e56b6208f465864e55d3fd

Tree: 8df5c719acd565c9d2495131be448de025c39165

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Dismiss active diagnostics on invalidation (#25646)

When migrating to gpui2,
https://github.com/zed-industries/zed/commit/588976d27a22bb36a5aac7e762b21e180a66a2f9#diff-a3da3181e4ab4f73aa1697d7b6dc0caa0c17b2a187fb83b076dfc0234ec91f54R21
removed the diagnostic style for "active but invalid" case: presumably,
it served as some sort of a cursor to show where to move on after the
diagnostics update, on the next `GoTo[Prev]Diagnostic` action call.

As this change went unchanged for some time, another approach is tested
now, to be more integrated with inline diagnostics: now, the active
state is cleared

Same as before this change, another `GoTo[Prev]Diagnostic` action call
will be needed to re-expand a new diagnostics, but this change makes
this expansion to happen after the cursor — before the change, Zed would
continue from the stale diagnostics.

Release Notes:

- Fixed active diagnostics becoming stale
```

## Parents

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

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