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

Change inline diagnostics tagger to be a viewport tagger #75836

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

CyrusNajmabadi
Copy link
Member

It was already replicating hte logic to tag parts of the file out of view. This just sits us on the existing mechanism for doing that.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 8, 2024 21:08
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 8, 2024
Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

@@ -111,7 +95,7 @@ protected override async Task ProduceTagsAsync(

var options = GlobalOptions.GetInlineHintsOptions(document.Project.Language);

var snapshotSpan = documentSnapshotSpan.SnapshotSpan;
var snapshotSpan = spanToTag.SnapshotSpan;
Copy link
Contributor

Choose a reason for hiding this comment

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

Couple nits not related to this PR, I'm not sure how often this code is invoked:

  1. Should the code in the loop be using Text instead of ToString()? I know the impl delegates ToString() to Text, but it seems weird to rely on that.

  2. The Sum could instead by an All with length 0. No need to walk all the display parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants