Patch for trailing whitespace removal behavior

Subramaniyam Raizada subraizada3 at
Tue Apr 17 08:34:58 UTC 2018


I edited the KTextEditor to not clear trailing space from the line the
cursor is currently on.

This is useful for those who save often, because without this, typing
something like this (dots = space):

if (condition) {
....<-- cursor here
} <autocompleted end bracket>

and saving or pausing to take a break (which would involve saving)
results in the autoindent being lost, and the cursor going back to the
beginning of the line.

It still removes trailing whitespace when the cursor is not on the end
of the line. With this example:

a.b...cdde..<cursor here>...

all trailing whitespace will be removed. The whitespace on lines 1/3
will be removed no matter what, and the trailing whitespace on line 2 is
removed because the cursor is not at the end of the line.

It did fail test #66 'vimode_keys' when I ran `make test`. I believe
this may be related to bug 392858 - vi mode :q (quit) command works in
Kate but not KWrite <>

- Sub Raizada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-don-t-remove-trailing-space-from-current-line.patch
Type: text/x-patch
Size: 1153 bytes
Desc: not available
URL: <>

More information about the KWrite-Devel mailing list