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

            Bug ID: 397956
           Summary: Kate unconditionally removes trailing spaces if
                    .kateconfig file doesn't exist
           Product: kate
           Version: 18.08.0
          Platform: Archlinux Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: application
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: itgvk...@grr.la
  Target Milestone: ---

I've found that if .kateconfig file doesn't exist in user $HOME, Kate always
removes trailing whitespaces on document saving.

[Document]
...
Keep Extra Spaces=true
Remove Spaces=0
...

In "Open/Save" -> "Remove trailing spaces" is set to "never"

Clicking on "Save" in Kate toolbar clear all trailing spaces in document making
it irreversibly damaged as there is no chance to undo changes without saving
document.

After merely touching an empty ".kateconfig" file in top $HOME dir or the dir
where files are edited, everything is working normal, i.e. Kate keeps
whitespaces if config is set to "never" and clears them if config is set to "In
entire Document". I tested this with fresh kate config.

Steps to reproduce:

1. touch abc
2. echo " " >abc
3. kate abc
4. Chose "Open/Save" -> "Remove trailing spaces" -> "never" -> "Apply" -> "Ok"
5. Click "Save" button (notice "Undo button is activated which means changes
are done in document)
6. Exit kate
7. touch .kateconfig
8. rm abc && touch abc && echo " " >abc
9. Click "Save" button (notice "Undo button isn't activated which means there
aren't changes done in document)

Kde plasma:5.13
Kde frameworks: 5.49
Qt: 5.11.1
Distro: Archlinux

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

Reply via email to