# diagnostics: Add back links to nearby related diagnostics \(\#64134\) · gitcafe/zed

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

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

Visibility: public

Requested revision: bd61c4a2e3e66e96fa5282311d28c65210d1146c

Requested commit: bd61c4a2e3e66e96fa5282311d28c65210d1146c

Commit: bd61c4a2e3e66e96fa5282311d28c65210d1146c

Tree: d956c820ccd7792d666a6b02df2f4ddb1d1fb34b

Author: Gautam Manchandani

Committer: GitHub

## Message

```
diagnostics: Add back links to nearby related diagnostics (#64134)

# Objective

Fixes #63835.

Nearby related diagnostics omitted the link back to their primary
diagnostic.

## Solution

Always include the existing back link on related diagnostic blocks,
regardless of line distance. The primary diagnostic still suppresses
nearby related hints as before.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Improved diagnostic navigation by showing back links to the primary
diagnostic even for nearby related diagnostics.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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