Skip to content

diagnostics: Prefer activating diagnostic under cursor (#52957) (cherry-pick to stable)#58603

Merged
zed-zippy[bot] merged 1 commit into
v1.5.xfrom
cherry-pick-v1.5.x-3bb2f2a6
Jun 5, 2026
Merged

diagnostics: Prefer activating diagnostic under cursor (#52957) (cherry-pick to stable)#58603
zed-zippy[bot] merged 1 commit into
v1.5.xfrom
cherry-pick-v1.5.x-3bb2f2a6

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #52957 to stable


Update the behavior of both editor: go to diagnostic and editor: go to previous diagnostic in order to ensure that, if there's a diagnostic
under the user's cursor that isn't active, it is first activated, with a
subsequent call jumping to the next or previous diagnostic,
respectively.

These changes also update how diagnostic activation handles the
situation when the global diagnostic renderer is not registered, as we
used to not update the active diagnostic group in that situation.
However, we now rely on it to determine whether the user's cursor is
already in the active diagnostic, with some tests now failing, so we now
default to an empty set of blocks for the active diagnostic group when
no global renderer is registered.

Release Notes:

  • Update both editor: go to diagnostic and editor: go to previous diagnostic to prefer activating the diagnostic under the cursor before
    jumping to the next or previous diagnostic, respectively

Co-authored-by: dino dinojoaocosta@gmail.com

Update the behavior of both `editor: go to diagnostic` and `editor: go
to previous diagnostic` in order to ensure that, if there's a diagnostic
under the user's cursor that isn't active, it is first activated, with a
subsequent call jumping to the next or previous diagnostic,
respectively.

These changes also update how diagnostic activation handles the
situation when the global diagnostic renderer is not registered, as we
used to not update the active diagnostic group in that situation.
However, we now rely on it to determine whether the user's cursor is
already in the active diagnostic, with some tests now failing, so we now
default to an empty set of blocks for the active diagnostic group when
no global renderer is registered.

Release Notes:

- Update both `editor: go to diagnostic` and `editor: go to previous
diagnostic` to prefer activating the diagnostic under the cursor before
jumping to the next or previous diagnostic, respectively

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 5, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Jun 5, 2026
@zed-zippy zed-zippy Bot merged commit 6b38597 into v1.5.x Jun 5, 2026
41 checks passed
@zed-zippy zed-zippy Bot deleted the cherry-pick-v1.5.x-3bb2f2a6 branch June 5, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant