Skip to content

Revert over-eager bailout when trimming trailing whitespace #28848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Dec 4, 2018

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
Copy link
Member Author

sandersn commented Dec 4, 2018

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

Copy link
Contributor

@jessetrinity jessetrinity left a comment

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants