FIXED? 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
zifnab
Posts: 11
Joined: 28 Sep 2017 13:32

FIXED? 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by zifnab » 28 Sep 2017 13:36

before talking about the bug, I would like to start by congratulating you for this editor which is in my mind the BEST free editor out there. NO other comes close and I did review thoroughly MANY.

when it comes to the bug (reported while using 12.35 x64):
if I open a file with a filler (every line ends with a lot of spaces, and the end of line sympbol (unix: LF) is always at the same column position after those filling spaces on the right).
if I modify something in the line, and move the cursor away from this line, it trims the filler spaces right (especially easy to see with the 'view > special characters: spaces & tabs' checked).

it of course save with this issue if I do a save later on.
but this truly happen in the editor, not at save time.

this is wrong because it modifies the file further than the manual modification I did/intended.
by the way, if wondering, I have in 'option > file > miscellaneous section: remove trailing white spaces before saving' UNcheked.

if it helps, I found a slightly different behavior to the same issue:
if I switch to column mode and change a single characters in all the lines, it seems like only the very latest line gets its spaces right trimmed.

ps: I attached a sample (clean) file to play with.

but most of all, and once again, thanks a lot for this great app!
Attachments
OCN_CAA_FLUXQUOTIDIEN_20170925-015818.7z
sample (clean) file to play with
(1 KiB) Downloaded 39 times
Last edited by zifnab on 28 Sep 2017 14:57, edited 1 time in total.

User avatar
Rickard Johansson
Site Admin
Posts: 5550
Joined: 19 Jul 2006 14:29

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by Rickard Johansson » 28 Sep 2017 14:31

There are two options that affects the behavior of trailing blanks.

Code: Select all

Options -> General -> Editing:
	[] Keep trailing blanks
	[] Allow text cursor beyond end of line
The first one is fairly obvious. If the second option is set the editor does insert spaces if you move the text cursor beyond the end of line and remove them when moving to a different line. Unless the first option is set.

Play around with it and let me know if it doesn't work as expected.

zifnab
Posts: 11
Joined: 28 Sep 2017 13:32

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by zifnab » 28 Sep 2017 14:55

ok.
both were unchecked (which is default after fresh (portable) install).
- if I check "keep trailing blanks":
it also checks "allow text cursor beyond end of line".
I cannot find a way around it.
yet. it fixed the issue I described which is a good thing, thanks!

this leads me to 2 comments/requests:
- this should be default settings (I mean "keep trailing blanks" should): the idea being I don't want a text editor to do changes "behind my back" without me knowing.
if I do require this kind of auto-changes, I am deliberately aware of it and can look in the options to tweak them to accomodate this SPECIAL behavior (aka. this time "me knowing").
- is there no way to have "keep trailing spaces" checked without having "allow text cusor beyond end of line"? because those are 2 separate things (and you did split those settings...)

IMHO the standard default settings should be: "don't change the file whatsoever" and don't allow cursor after end of line which is for many a very misleading behavior (though I can understand and appreciate you let the user able to change that in options or through specific actions in the editor).

best regards.

edit: btw, thinking more about it, I do think that "keep trailing blanks" and "remove trailing white spaces before saving" are TRULY truly redundant.
it seems to me it would be better to have a single one, and if one should remain, "remove trailing white spaces before saving" makes more sense.
moreover "remove trailing white spaces before saving" has currently a good default (unchecked) which is in CONTRADICTION with "keep trailing blanks" unchecked default: they cover the same thing, yet by default say the contrary from one another (one trims while the other explicitly does not). this small mumbo/jumbo would be one more reason to fuse those 2 in a single straight option.

User avatar
Rickard Johansson
Site Admin
Posts: 5550
Joined: 19 Jul 2006 14:29

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by Rickard Johansson » 28 Sep 2017 15:14

The default behavior is to not allow cursor beyond end of line and not to trim trailing spaces.
The trimming only occur if you set the option to allow the text cursor beyond end of line. Unless you set the second option.

I've tested with your file and I can't duplicate your issue. With the two options unchecked - the trailing spaces are left unaffected.

User avatar
Rickard Johansson
Site Admin
Posts: 5550
Joined: 19 Jul 2006 14:29

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by Rickard Johansson » 28 Sep 2017 15:35

I've fixed the trailing space trimming in column mode in the next release.

zifnab
Posts: 11
Joined: 28 Sep 2017 13:32

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by zifnab » 28 Sep 2017 16:22

Rickard Johansson wrote:
28 Sep 2017 15:14
The default behavior is to not allow cursor beyond end of line and not to trim trailing spaces.
it would be nice, but it doesn't look that way when going through the options since "keep trailing blanks" is UNchecked by default. in layman's terms speaking uncheck means trimming... is it just a matter of vocabulary/label for this option?
Rickard Johansson wrote:
28 Sep 2017 15:14
The trimming only occur if you set the option to allow the text cursor beyond end of line. Unless you set the second option.
strange since I had all 3 options discussed unchecked when the bug occured (which is all default). except if you found out it only occurs when column mode selection is enabled.

thanks.
looking forward to the next release then.

User avatar
Rickard Johansson
Site Admin
Posts: 5550
Joined: 19 Jul 2006 14:29

Re: 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by Rickard Johansson » 28 Sep 2017 17:02

I think the check boxes in options have been repositioned at some point when making changes. I've changed it to:

Code: Select all

[] ...
[] Allow cursor beyond end of line
   [] Keep trailing blanks
[] ...

zifnab
Posts: 11
Joined: 28 Sep 2017 13:32

Re: FIXED? 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by zifnab » 28 Sep 2017 17:05

ha ok.
it's incredible how this small reordering (and parent/child relationship) changes the meaning entirely.

thanks for your help.

zifnab
Posts: 11
Joined: 28 Sep 2017 13:32

Re: FIXED? 12.35 x64: modify a line and its filler (right) spaces get trimmed wrongfully

Post by zifnab » 02 Oct 2017 09:01

confirmed fixed in 12.40 final.
thanks =)

Post Reply