zed icon indicating copy to clipboard operation
zed copied to clipboard

editor: Support walking through overlapping diagnostics

Open kahlstrm opened this issue 10 months ago • 4 comments

While looking into how to implement #4901, noticed that the current Goto next/previous diagnostic behaved a bit weirdly. That is, when there are multiple errors that have overlapping ranges, only the first one can be chosen to be active by the go_to_diagnostic_impl.

Previous behavior:

https://github.com/zed-industries/zed/assets/71292737/95897675-f5ee-40e5-869f-0a40066eb8e3

Doesn't go through all the diagnostics, and going backwards and forwards doesn't show the same diagnostic always.

New behavior:

https://github.com/zed-industries/zed/assets/71292737/81f7945a-7ad8-4a34-b286-cc2799b10500

Should always go through the diagnostics in a consistent manner.

Release Notes:

  • Improved the behavioral consistency of "Go to Next/Previous Diagnostic"

kahlstrm avatar Apr 28 '24 18:04 kahlstrm

Warnings
:warning:

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- (Added|Fixed|Improved) ... ([#<public_issue_number_if_exists>](https://github.com/zed-industries/zed/issues/<public_issue_number_if_exists>)).

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by :no_entry_sign: dangerJS against a728dd0d1ac7686e256ff9560125d02bcd7a7349

zed-industries-bot avatar Apr 28 '24 18:04 zed-industries-bot

@osiewicz Mind taking a quick look at this one?

kahlstrm avatar Apr 29 '24 19:04 kahlstrm

Could you share your eslint config? I'd like to play with this branch locally.

osiewicz avatar Apr 30 '24 13:04 osiewicz

Could you share your eslint config? I'd like to play with this branch locally.

eslint config

tsconfig

The file I was playing around in was this one, but those two files should work the same regardless of exact file

kahlstrm avatar Apr 30 '24 13:04 kahlstrm