Skip to content

Revert over-eager bailout when trimming trailing whitespace - #28848

Merged
Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
fix-format-trailing-whitespace
Dec 4, 2018
Merged

Revert over-eager bailout when trimming trailing whitespace#28848
Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
fix-format-trailing-whitespace

Conversation

@sandersn

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 Nathan Shively-Sanders (sandersn) changed the title Revert over-eager bailout when trailing whitespace Revert over-eager bailout when trimming trailing whitespace Dec 4, 2018
@sandersn

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.

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.

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