From 6efbd1d05f8d019122c1268e3df10b86a7b168ab Mon Sep 17 00:00:00 2001 From: Basoundr_ms Date: Wed, 11 Jun 2014 10:28:33 -0700 Subject: [PATCH] Bugfix 912735 Smart Indenter was not handling all the cases, where the return is pressed twice after a comment The existing case handles only the case where the caret is immediately followed a token which also happens to be the end of an indent operation. The cases that are added: The premise in these cases is, the user has pressed 2 returns after a comment 1. There are executable code after the caret which also belong to the same indent block as the caret Behavior : Place the caret at the column where the other executable statements of the block are placed. Eg: static void Main(string[] args) { // A // B $$ return; } 2. Inside an initializer block with the previous token being the comma token of the separation list Behavior - Place the caret at the column where the previous argument to the list started Eg: var s = new List { "", "",/*sdfsdfsdfsdf*/ // dfsdfsdfsdfsdf $$ }; (changeset 1276027) --- Src/Workspaces/CSharpTest/Formatting/FormattingTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Workspaces/CSharpTest/Formatting/FormattingTests.cs b/Src/Workspaces/CSharpTest/Formatting/FormattingTests.cs index 283357d366a..d06344e7e69 100644 --- a/Src/Workspaces/CSharpTest/Formatting/FormattingTests.cs +++ b/Src/Workspaces/CSharpTest/Formatting/FormattingTests.cs @@ -5326,7 +5326,7 @@ static void Main(string[] args) AssertFormat(expected, code, parseOptions: parseOptions); } - [WorkItem(956631, "DevDiv")] + [WorkItem(924172, "DevDiv")] [Fact, Trait(Traits.Feature, Traits.Features.Formatting)] public void IgnoreSpacesInDeclarationStatementEnabled() { -- GitLab