Bug 473218 - KWrite removes trailing spaces when it shouldn't
Summary: KWrite removes trailing spaces when it shouldn't
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.04.3
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 15:32 UTC by Benjamin
Modified: 2023-08-10 07:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin 2023-08-09 15:32:44 UTC
SUMMARY
KWrite removes trailing spaces as if the corresponding setting was set to "In Entire Document"


STEPS TO REPRODUCE
1. Have "Remove trailing spaces" set to "On Modified Lines" or "Never"
2. Open a file that contains trailing spaces at the end
3. Press CTRL+S


OBSERVED RESULT
all trailing spaces are removed

EXPECTED RESULT
all trailing spaces stay

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.27
(available in About System)
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
I had this issue previously, but it went away after a few days (possibly/likely after a system update)
Comment 1 Waqar Ahmed 2023-08-09 15:36:31 UTC
Did your document live in a project which has a .editorconfig or a .kateconfig file?
Comment 2 Waqar Ahmed 2023-08-09 15:36:52 UTC
project / directory
Comment 3 Benjamin 2023-08-09 16:41:21 UTC
Yes, there is some .editorconfig file ib the same folder, containing "trim_trailing_whitespace = true". So that seems to be the actual issue I have (sorry, not a bug then).

Is there a way to override this behavior without editing the .editorconfig file?
Comment 4 Waqar Ahmed 2023-08-10 07:42:32 UTC
> Is there a way to override this behavior without editing the .editorconfig file?

No. The purpose of that file is to override editor's own config and provide same behaviour regardless of the editor.