Patch for trailing whitespace removal behavior
Subramaniyam Raizada
subraizada3 at gmail.com
Tue Apr 17 08:43:39 UTC 2018
I had read the 'submitting your first patch' section on the KDE wiki and
for some reason still thought I was supposed to post it here first;
sorry about that. It's been submitted properly via Phabrikator.
On 04/17/2018 04:34 AM, Subramaniyam Raizada wrote:
> Hi,
>
> 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:
>
> abc..
> a.b...cdde..<cursor here>...
> def.....
>
> 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 <https://bugs.kde.org/show_bug.cgi?id=392858>
>
> - Sub Raizada
>
More information about the KWrite-Devel
mailing list