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

Ctrl+Backspace on a spaces-only line now deletes the whole line (\n as well)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 17.0.1, Qt Creator 18.0.0, Qt Creator 19.0 (master branch)
    • Editors
    • None
    • Linux Mint 21.3
    • b2a235491 (17.0)

      It's a breaking and such an annoying change compared to Qt Creator 15.0, that I've been using before.

      Now, basically, it's not possible to remove all spaces and go to the start of a line without either:

      • using the mouse
      • typing Backspace once per space character.

      Consider example:

      void foo()
      {
          while (true) {
              if (bar) {
                  int qux = 1;
                  |<-
              }
          }
      }
      

      The |<- is whether the cursor is. After issuing a Ctrl+Backspace I expect the behaviour to be the same as it was in all historical versions of Qt Creator down to v1:

      void foo()
      {
          while (true) {
              if (bar) {
                  int qux = 1;
      |<-
              }
          }
      }
      

      But Instead I get:

      void foo()
      {
          while (true) {
              if (bar) {
                  int qux = 1;|<-
              }
          }
      }
      

      Please, bring back the original behavior.

      I want to add that this behavior is not unique to Ctrl+Backspace. It seems that the text selection logic is broken as well: Ctrl+Shift+<Left> selects the \n in addition to spaces. While Ctrl+Shift+<Right> works as before and stops at the end of a current line.

        For Gerrit Dashboard: QTCREATORBUG-33428
        # Subject Branch Project Status CR V

            davschul David Schulz
            greenscape Paul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes