VS 2022 Editable placeholders/literals in Code Snippets cannot be completed when placed inside a C# string literal #57733
Labels
Area-IDE
Bug
Developer Community
The issue was originally reported on https://developercommunity.visualstudio.com
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work] [regression] [worked-in:16.11.5]
When defining a Code Snippet that contains at least one editable snippet literal positioned inside a C# string literal, and the user interaction through tabbing/editing finishes with the text input caret placed inside the C# string literal, ending/confirming the snippet via Enter key is not possible. The reason seems to be that the editor will prefer splitting the C# string literal into the next line (separated with
" + "
) instead of finalizing the snippet editing process.Example Snippet "
" Element Content:
<! [CDATA[string s = "$myLiteral$";]] >
Invoking the snippet, typing some text and confirming with the Enter key ends up with this:
! [SnippetEnterProblem.png] (https://aka.ms/dc/image?name=B9611d77298b14f46907fdfed3e193ff0637722442634760452_SnippetEnterProblem.png&tid=9611d77298b14f46907fdfed3e193ff0637722442634760452)
Notes:
Original Comments
Feedback Bot on 11/11/2021, 10:09 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: