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

Apply changes directly to text buffer - take 2 #62617

Merged
merged 2 commits into from
Jul 18, 2022
Merged

Conversation

tmat
Copy link
Member

@tmat tmat commented Jul 13, 2022

Hook up Venus custom buffer change pre- and post-processing.

Previously this was triggered via Workspace.TryApplyChanges.

Validation: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/410945

@tmat tmat requested a review from a team as a code owner July 13, 2022 19:48
@tmat
Copy link
Member Author

tmat commented Jul 13, 2022

@jasonmalinowski PTAL

@tmat
Copy link
Member Author

tmat commented Jul 13, 2022

@CyrusNajmabadi @genlu FYI

@@ -246,10 +250,10 @@ public void UpdateText(SourceText newText)
}
}

private IEnumerable<TextChange> FilterTextChanges(SourceText originalText, List<TextSpan> editorVisibleSpansInOriginal, IReadOnlyList<TextChange> changes)
private IEnumerable<TextChange> FilterTextChanges(SourceText originalText, List<TextSpan> editorVisibleSpansInOriginal, IEnumerable<TextChange> changes)
Copy link
Member

Choose a reason for hiding this comment

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

it's unfortunate we have to widen it to IEnumerable, is it possible to keep it a IReadOnlyList?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why is that? Seems unnecessary to require a list.

Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

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

The new change looks good to me. But someone actually knows this stuff should take a look. Also let's queue a validation insertion to make sure the tests are passing.

@tmat tmat merged commit 476248a into dotnet:main Jul 18, 2022
@tmat tmat deleted the TextBufferChanges branch July 18, 2022 18:22
@ghost ghost added this to the Next milestone Jul 18, 2022
333fred added a commit to 333fred/roslyn that referenced this pull request Jul 18, 2022
* upstream/main: (40 commits)
  Revert "Generalize RoamingProfileStorageLocation to ClientSettingsStorageLocation (dotnet#62684)"
  Revert "Update SymReader to the latest version (dotnet#62695)"
  Apply changes directly to text buffer - take 2 (dotnet#62617)
  Allow diagnostic tagging to use either push or pull diagnostics
  Tests test and more tests
  Fix new rename showing overloads when not applicable (dotnet#62559)
  Add stronger type safety
  Add support for resolving contextual error types
  Pass LineFormatting options into OmniSharpCodeAction options
  Initial approach to supporting contextual types
  Update dependencies from https://github.com/dotnet/arcade build 20220715.4 (dotnet#62704)
  Handle diff3 conflict markers (dotnet#62391)
  Update SymReader to the latest version (dotnet#62695)
  Generalize RoamingProfileStorageLocation to ClientSettingsStorageLocation (dotnet#62684)
  Add IWorkspaceProjectContextFactory F# wappers (dotnet#62646)
  Use OmniSharp LineFormatting fallback options in more places.
  Remove dependency on Microsoft.VisualStudio.RemoteControl assembly from Features (dotnet#62655)
  Add array initialization optimization (dotnet#62392)
  [main] Update dependencies from dotnet/arcade (dotnet#62597)
  Keep selection on rename invocation (dotnet#62654)
  ...
adamperlin pushed a commit to adamperlin/roslyn that referenced this pull request Jul 19, 2022
* Revert "Revert "Apply changes directly to text buffer (dotnet#62337)" (dotnet#62589)"

This reverts commit 0a39dcf.

* Apply changes to ContainedDocument subject buffer
@allisonchou allisonchou modified the milestones: Next, 17.4 P1 Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants