Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-8274

"Comment line" shortcut incompatible with auto-indentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 2.6.0
    • Fix Version/s: None
    • Component/s: Editors
    • Labels:
      None
    • Environment:
      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.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              davschul David Schulz
              Reporter:
              droetker Christian Gonzalez
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes