Skip to content

Revert over-eager bailout when trimming trailing whitespace#28848

Merged
sandersn merged 1 commit into
masterfrom
fix-format-trailing-whitespace
Dec 4, 2018
Merged

Revert over-eager bailout when trimming trailing whitespace#28848
sandersn merged 1 commit into
masterfrom
fix-format-trailing-whitespace

Conversation

@sandersn

@sandersn sandersn commented Dec 4, 2018

Copy link
Copy Markdown
Member

Broken by #27978, which removed the fallback. Before that change, if formatting processed no ranges, then trimTrailingWhitespacesForRemainingRange would instead use the original range. During the development of #27978, I thought it was necessary to instead skip trimming when no ranges were processed. This turns out to be wrong, so this PR reinstates the original behaviour.

Fixes #28781

@sandersn sandersn changed the title Revert over-eager bailout when trailing whitespace Revert over-eager bailout when trimming trailing whitespace Dec 4, 2018
@sandersn sandersn merged commit ee987a2 into master Dec 4, 2018
@sandersn sandersn deleted the fix-format-trailing-whitespace branch December 4, 2018 20:45
@sandersn

sandersn commented Dec 4, 2018

Copy link
Copy Markdown
Member Author

I also ported this to 3.2 since it should ship with the version of 3.2 that ships with VS.

@jessetrinity jessetrinity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discovering test is green.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants