Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor: Support walking through overlapping diagnostics #11139

Merged
merged 1 commit into from May 10, 2024

Conversation

kahlstrm
Copy link
Contributor

@kahlstrm kahlstrm commented Apr 28, 2024

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:

Screen.Recording.2024-04-28.at.21.34.29.mov

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

New behavior:

go_to_diagnostic_after.mov

Should always go through the diagnostics in a consistent manner.

Release Notes:

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

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 28, 2024
@kahlstrm kahlstrm force-pushed the main branch 2 times, most recently from cf0de4f to 42e2c1a Compare April 28, 2024 18:40
@maxdeviant maxdeviant changed the title editor: support walking through overlapping diagnostics editor: Support walking through overlapping diagnostics Apr 28, 2024
@zed-industries-bot
Copy link

zed-industries-bot commented Apr 28, 2024

Warnings
⚠️

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 🚫 dangerJS against a728dd0d1ac7686e256ff9560125d02bcd7a7349

@kahlstrm kahlstrm force-pushed the main branch 3 times, most recently from f017132 to a728dd0 Compare April 28, 2024 23:49
@kahlstrm
Copy link
Contributor Author

@osiewicz Mind taking a quick look at this one?

@osiewicz
Copy link
Contributor

osiewicz commented Apr 30, 2024

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

@kahlstrm
Copy link
Contributor Author

kahlstrm commented Apr 30, 2024

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

Copy link
Contributor

@osiewicz osiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@osiewicz osiewicz merged commit b8a8344 into zed-industries:main May 10, 2024
1 check passed
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this pull request May 18, 2024
…es#11139)

While looking into how to implement zed-industries#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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants