Support smart escaping of text when pasting into string expressions (part1).#60036
Merged
CyrusNajmabadi merged 115 commits intodotnet:mainfrom May 3, 2022
Merged
Support smart escaping of text when pasting into string expressions (part1).#60036CyrusNajmabadi merged 115 commits intodotnet:mainfrom
CyrusNajmabadi merged 115 commits intodotnet:mainfrom
Conversation
sharwell
reviewed
Mar 15, 2022
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
sharwell
reviewed
Mar 15, 2022
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
sharwell
reviewed
Mar 15, 2022
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/CSharpTest/StringCopyPaste/StringCopyPasteCommandHandlerTests.cs
Outdated
Show resolved
Hide resolved
Contributor
|
Re-targeting from |
Member
|
Retargeting to main so we can remove main-vs-deps branch |
…ommandHandlerTests.cs Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
Contributor
Author
|
Goign to merge this in. Then, the work to support copy/paste from/to an existing string literal will be done in #61111 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP for #31869
Initial support for a smart-string-copy-paste system. The general ideas here are:
""from inside a verbatim string (like@" goo "" bar "" baz "), then we can know this represents a single quote character.For all of the above, we ensure that any special work we do happens as a second edit transaction. THat way if the user ever doesn't want the contextual-pasting result, they can undo and get back to exactly the code that pastes normally.
This PR effectively adds the italicized items in this table:
--
This is still a WIP as i work through all the combinations of source/destination text forms. In particular interpolated strings and raw strings are compelx in terms of how pasting has to work.