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

Keep selection on rename invocation #62654

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

ryzngard
Copy link
Contributor

@ryzngard ryzngard commented Jul 14, 2022

Fixes #60868

@ryzngard ryzngard requested review from a team as code owners July 14, 2022 21:00
: selectionSpan.Start - originalSpan.Start; // The length from the identifier to the start of selection

var length = selectionSpan.IsEmpty
? _renameService.ActiveSession.ReplacementText.Length
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same as originalSpan.Length?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, and much easier to understand if I use that. Good catch

@ryzngard ryzngard enabled auto-merge (squash) July 14, 2022 22:34
@ryzngard ryzngard merged commit b0de0c8 into dotnet:main Jul 15, 2022
@ghost ghost added this to the Next milestone Jul 15, 2022
@ryzngard ryzngard deleted the issues/60868_rename_keep_selection branch July 15, 2022 02:12
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
@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.

New Inline Rename UI should maintain the selection from the editor
3 participants