-
Notifications
You must be signed in to change notification settings - Fork 3
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
%s causes the entire file to have whitespace stripped #13
Comments
So it looks like this does an actual edit to every normal mode line, sometimes just replacing it with itself. That is, it does not edit the lines in place. I agree it would be ideal not to strip the un"modified" lines, departing from the Vim definition of "modified." Maybe the plugin should save the unmodified line every time the line number changes, then check if the line has been truly modified after manual changes. Of course, that presumes that the cursor actually moves during a normal mode regex, which may not be the case. None of that behavior is documented, so I'd need to play around with it. |
I just tried to reproduce this behaviour, but couldn't. This was on Vim 8.1 (my own compiled version). The test file I used (note trailing whitespace on each line):
The test command was Unless someone can reproduce, I vote we close. |
Just a sanity check: Are you sure white space is actually getting stripped at all?
… On 22/03/2019, at 3:43 AM, Henré Botha ***@***.***> wrote:
I just tried to reproduce this behaviour, but couldn't. This was on Vim 8.1 (my own compiled version). The test file I used:
some spaces here
some more here
and again
The test command was :%s/here/there/.
Unless someone can reproduce, I vote we close.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Good catch! It's not. So it's a different bug then: |
file (add some whitespace to each line when testing):
open vim with that file and make sure that you have the whitespace saved.
now open vim and have lessspace enabled. run
:%s/private/public/<CR>
and now the whitespace is stripped from every line, not just the 1st line (which would be the ideal behaviour)The text was updated successfully, but these errors were encountered: