Don't leave trailing whitespace when text wrapping #20

Merged
merged 1 commit into from Sep 18, 2013

1 participant

@ghost

First asked on https://groups.google.com/forum/#!topic/vim_dev/Q_KGrMevqW0 and was told the error was with the indent/php.vim script and to contact its maintainer, which I have done here.

Trailing whitespace is left at the end of comment lines when text is wrapped as a result of the 'textwidth' setting. This only occurs in the PHP filetype.

Removing formatoptions+=w fixes the bug, as done in this pull request.

@2072
Owner

Remember that you can use :let g:PHP_autoformatcomment = 0 to disable the formatoptions changes and use your own.
I'll include your change as it's not a generally accepted behaviour (since it only happens in PHP files). I hope that not too many people were relying on paragraph detection inside comments.

I don't remember why I added this 'w' setting anyway...

@2072 2072 merged commit bf26e44 into 2072:master Sep 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment