Bug 384845

Summary: Multiline comments are reformatted incorrectly when using tab to indent blocks of code
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Jan Pavlicek <jan.pavlicek>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: CLOSED NOT A BUG    
Severity: normal CC: mail
Priority: NOR    
Version First Reported In: 5.38.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Visual animated description of the problem

Description Jan Pavlicek 2017-09-19 09:20:18 UTC
Created attachment 107903 [details]
Visual animated description of the problem

Hello,

the gif in the attachement says it all. When I have a multiline comment in a PHP code, kdevelop formats it correctly when typing - that is write "/*" on the first line, hit enter and the next line is automaticaly indented bellow the "*". 

But when I select multiple lines with such comment blocks on them and hit tab to indent (or shift+tab to deindent), the comment formatting gets messed up, putting all the asterisks bellow the "/" in the first line. This is still valid code but a nightmare for version control.

I use kdevelop from archlinux packages, latest version, with the C style indenter.
Comment 1 Kevin Funk 2017-09-19 10:04:08 UTC
Could you go to Settings -> Configure -> Editor -> Editing -> Indentation and select:
  [x] Keep extra spaces

Does that fix the problem for you?

This problem is unrelated to the underlying language iiuc.
Comment 2 Jan Pavlicek 2017-09-19 10:15:23 UTC
@Kevin Funk - yes, it does fix the problem. Can't believe I overlooked that, I have tried lots of settings and somehow missed this. Thank you and I'm really sorry for filing this as a bug.

Best