Bug 502857 - When in indentation (why?) "keep remaining spaces" (conserver mes caractères supplémentaires) is checked, when line finished by a slash and a space, the space is removes when saving the file.
Summary: When in indentation (why?) "keep remaining spaces" (conserver mes caractères ...
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: indentation (other bugs)
Version First Reported In: 23.08.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-15 19:55 UTC by Hugues MOISY
Modified: 2025-04-16 09:48 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 Hugues MOISY 2025-04-15 19:55:38 UTC
SUMMARY
When in indentation (why?) "keep remaining spaces" (conserver les caractères supplémentaires) is checked, when line is finished by a slash and spaces after the slash (which I absolutely need to keep in my work), the spaces are removed when saving the file. They are still in the file as long as the has been no "Save to" 

STEPS TO REPRODUCE
1. Open a new file and type a line like "my line with a slash and spaces : /      " (without the "")
2. Copy the line or create new ones with a slash and spaces at the end
3. Save the file.

OBSERVED RESULT
The spaces will be removed. It doesn't occur with lines having no slash before the remaining spaces. Didn't check with other special characters.

EXPECTED RESULT
The text should have stayed the same, as the option is checked in Modification/Indentation/Propriétés d'indentation/Conserver les caractères supplémentaires.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Kubuntu 24.04
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2025-04-16 09:48:14 UTC
"Keep extra spaces" is not what you think it is.

For your purpose, change the following settings: Open/Save -> General tab -> Remove Trailing Spaces