You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Visual Studio - Format on Enter no longer removes extra whitespace #28781
Expected behavior:
Format on Enter previously removed extra whitespace inserted after the indentation on the empty line below var bar;. Caret represents the termination of whitespace on the previous line.
function foo()
{
var bar;
^
}
Actual behavior:
Format on Enter no longer removes extra whitespace.
function foo()
{
var bar;
^
}
Similar behavior is observed for non-empty lines. Expected:
Nathan Shively-Sanders (@sandersn) This is blocking our tests and I believe it exists in 3.2 which will ship with VS. My understanding is it causes a visible formatting issue in VS. Would you prioritize it accordingly?
Activity
minestarks commentedon Dec 3, 2018
Nathan Shively-Sanders (@sandersn) This is blocking our tests and I believe it exists in 3.2 which will ship with VS. My understanding is it causes a visible formatting issue in VS. Would you prioritize it accordingly?
sandersn commentedon Dec 4, 2018
Here's a fourslash repro:
The two whitespace-only lines should both have 0 spaces. After #27978 merged, the first one still has 4 spaces.
sandersn commentedon Dec 4, 2018
Selectively reverting #27978 shows that the regression was introduced by the change in trimTrailingWhitespacesForRemainingRange.