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

FakeVim's dot command fails if the last edit involves curly braces

    XMLWordPrintable

    Details

    • Commits:
      e158bfe6189ff186a09a95271ffcd6fbe042abea

      Description

      Enable FakeVim and start with this in a .cpp file:

      struct Test
      {
          int func1;
          int func2;
          int var1;
          int var2;
      };
      

       

      Correct behaviour

      1. Place the cursor at the end of "func1"
      2. Press 'i' '(' ')' to insert parentheses
      3. Press <Esc> to exit Insert mode
      4. Place the cursor at the end of "func2"
      5. Press '.' (dot command)

       

      Result (correct): Parentheses are inserted at the end of "func2"

       

      Wrong behaviour

      1. Place the cursor at the end of "var1"
      2. Press 'i' '=' '{' '}' to insert an empty initializer
      3. Press <Esc> to exit Insert mode
      4. Place the cursor at the end of "var2"
      5. Press '.' (dot command)

       

      Result (wrong): Nothing happens

      Expected result: An empty initializer should be inserted at the end of "var2"

      Reproducible only without ClangFormat plugin

        Attachments

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

          Activity

            People

            Assignee:
            hjk hjk
            Reporter:
            skoh-qt Sze Howe Koh
            Votes:
            8 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes