Details
-
Bug
-
Status: Open
-
P3: Somewhat important
-
Resolution: Unresolved
-
Qt Creator 2.6.0
-
None
-
None
-
Linux, Ubuntu
Description
In the CPP editor, open any C++ file, and position the cursor on any line with some indented text. Press Ctrl+Shift+/ to comment that line. The "//" appear in the first two characters, shifting the whole line to the right by two.
Now press Ctrl+A (to select the whole file content) and press Ctrl+I.
The whole file is indentation-"corrected", but the previous comment now is indented to the "right" level, according to it's context.
This breaks source code/git commits, as it can not be undone. When you press Ctrl+Shift+/ again on that line, the wrongly applied indentation is not removed a gain, so that this line stays in the wrong column.
Best Possible solution IMHO:
Ctrl+I (auto indentation) should ignore comments that start at line 0.