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

Pressing enter on autocompletion suggestions does not result in them being inserted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.14.0-beta1
    • Qt Creator 4.14.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu 18.04.3
      Qt Creator 4.14.0-beta1 (4.13.82)
      Based on Qt 5.15.1 (GCC 7.5.0, 64 bit)
    • 859d2edbb5f4edffd5e041967d2f630b059ad829

    Description

      I'm using a self-built Creator on the 4.14 branch (5a9a9e800cd793bbc8607eee93023c8cda0fad9b) to test out some Qbs stuff. I noticed that when choosing autocompletion results with enter, sometimes the suggested text doesn't get inserted into the code. It seems that this message in Creator's output coincides with that:

      SOFT ASSERT: "m_proposal" in file ../../../../qt-creator/src/plugins/texteditor/codeassist/codeassistant.cpp, line 369 
      

      I haven't noticed this with 4.13.x.

      There's a video attached that shows the problem:

      creator-auto-completion-4.14.mp4

      At the end I press enter to use the suggestion, but nothing happens besides the context menu closing. Notice the extra line in the console output afterwards.

      So far, this has been reproducible every time I've tried. However, I noticed that, after it fails, if I then press Ctrl + Space after "target" to get context menu to come up again, pressing enter then results in the suggestion being used, as expected. So it's only an issue when writing the line from scratch in this particular case. In other cases doing a similar thing (bringing up the context menu in the middle of a line) results in the same problem.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: