https://bugs.kde.org/show_bug.cgi?id=433455

            Bug ID: 433455
           Summary: Unable to save trailing spaces
           Product: kate
           Version: 20.12.2
          Platform: Slackware Packages
                OS: Linux
            Status: REPORTED
          Severity: grave
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: k...@mitrah.ru
  Target Milestone: ---

SUMMARY

It is the standard that trailing spaces in code should be removed. .
For that there is the setting "Remove trailing spaces: on modified lines". 
But sometimes it is required to keep the spaces at the end of a line.
In kde4 if you leave the cursor after the trailing spaces and save the file
they are being kept. But in kde5 it is broken. And this is very annoying. The
only way left is to change the setting, save the file, and then change the
setting back. So the old behaviour must be restored.


STEPS TO REPRODUCE
1. Open Configure -> File opening & savig -> General
2. Change Remove trailing spaces: to "on modified lines" and save
3. Create a new line with some text and trailing spaces
4. Create the second line with some text and trailing spaces
5. Leave the cursor at the end of the second line
4. Save the text

OBSERVED RESULT

The trailing spaces on the both lines are removed 

EXPECTED RESULT

The trailing spaces on the fist line should be removed while on the second line
the spaces to the left of the cursor must be kept. 

SOFTWARE/OS VERSIONS
Operating System: Slackware 14.5
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.17
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Kate Version 20.12.2

ADDITIONAL INFORMATION
Probably it is worth to add an new option: "on modified lines except to the
left of the cursor'

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to