Remove trailing blanks removes extra line feeds at the end of a file

Claus Pedersen

Member³
I have the following code in an editor:
Code:
x
<space>
<space>
y
where is just a normal space.

I select the code and use Edit -> Selection -> Remove Trailing Blanks and get the resulting code:
Code:
x

y
This is OK and what I expect.

But when I delete the character y in the last line in the example above, so I end up having only lines with spaces at the end of the file, if I apply Remove Trailing Blanks, the line feeds are removed and I end up having a file with only one line, i.e. x.

Remove trailing blanks must only do what it says in the manual: remove trailing spaces and tabs from selected lines.
A line feed is not a blank and should not be deleted (and since it is only deleted when not followed by any other characters, it must be an error).

Please fix this bug, so a file with 100 lines always end up having 100 lines, even after removing blanks
 
Back
Top