Bug 429093

Summary: Kate doesn't respect spacing when commenting a line
Product: [Applications] kate Reporter: Podagric <kde.podagric>
Component: indentationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: justin.zobel
Priority: NOR    
Version First Reported In: 20.08.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Podagric 2020-11-14 13:52:59 UTC
SUMMARY
When a text has a spacing and I use the shortcut CTRL+D to comment on a line in the kate, the bars are added at the beginning of the line and not before the text, as most other programs do.

I have commented on the same piece of code (java) in three different programs
Sublime 3: https://i.imgur.com/YEraEmV.png
VsCode: https://i.imgur.com/IDagxIG.png
Kate: https://i.imgur.com/DYqlyre.png

Only the kate added the bars to this location. Maybe it's something to expect, but it makes more sense that the behavior is the same as other programs.

This behavior also happens in other languages, see this example with an XML file
Sublime 3: https://i.imgur.com/LgQG4Up.png
Kate: https://i.imgur.com/kovPh23.png

It's easier to comment on the lines manually than to do so using the CTRL+D shortcut, because the time that will be spent removing this unnecessary spacing is greater.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.9.8-arch1-1
OS Type: 64-bit
Comment 1 Justin Zobel 2020-11-21 11:48:29 UTC

*** This bug has been marked as a duplicate of bug 418918 ***