# Fix \`editor::GoToDiagnostics\` cycle \(\#24697\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 73b32a20e25cefe7ec495a28d7e7a21cf0f1190d

Requested commit: 73b32a20e25cefe7ec495a28d7e7a21cf0f1190d

Commit: 73b32a20e25cefe7ec495a28d7e7a21cf0f1190d

Tree: 24970060ff584cd1ae805a97f00c27c247ed78ac

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Fix `editor::GoToDiagnostics` cycle (#24697)

Re-lands https://github.com/zed-industries/zed/pull/24446 with a more
appropriate fix


https://github.com/user-attachments/assets/45f665f0-473a-49bd-b013-b9d1bdb902bd

After activating 2nd diagnostics group, `find_map` code for next
diagnostics did not skip the previous group for the same place.

This time, instead of fiddling with the diagnostics group comparison,
the code splits the diagnostics by search place, looks up the active
group (if any) in both split parts, and selects the entries after the
group elements.

Release Notes:

- Fixed `editor::GoToDiagnostics` action stuck when multiple diagnostics
groups belong to the same place
```

## Parents

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

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