Bug 384845 - Multiline comments are reformatted incorrectly when using tab to indent blocks of code
Summary: Multiline comments are reformatted incorrectly when using tab to indent block...
Status: CLOSED NOT A BUG
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.38.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-19 09:20 UTC by Jan Pavlicek
Modified: 2017-09-19 10:15 UTC (History)
1 user (show)

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


Attachments
Visual animated description of the problem (20.79 KB, image/gif)
2017-09-19 09:20 UTC, Jan Pavlicek
Details

Note You need to log in before you can comment on or make changes to this bug.
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