diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 323e03b02a339d3a6572ab1b98b8f9303c1c5887..a842ce9463819a80c85dbd4432a15881957241c7 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1415,6 +1415,9 @@ void BaseTextEditor::_q_requestAutoCompletion() { d->m_requestAutoCompletionTimer->stop(); + if (CompletionSupport::instance()->isActive()) + return; + if (d->m_requestAutoCompletionRevision == document()->revision() && d->m_requestAutoCompletionPosition == position()) emit requestAutoCompletion(editableInterface(), false); diff --git a/src/plugins/texteditor/completionsupport.cpp b/src/plugins/texteditor/completionsupport.cpp index 1ae51b106b5725091235de250bdc8a2d84beddd6..44dfad52199a4f7d9031e02fd00748d80a0e4d2a 100644 --- a/src/plugins/texteditor/completionsupport.cpp +++ b/src/plugins/texteditor/completionsupport.cpp @@ -93,6 +93,11 @@ void CompletionSupport::cleanupCompletions() } } +bool CompletionSupport::isActive() const +{ + return m_completionList != 0; +} + void CompletionSupport::autoComplete(ITextEditable *editor, bool forced) { autoComplete_helper(editor, forced, /*quickFix = */ false); diff --git a/src/plugins/texteditor/completionsupport.h b/src/plugins/texteditor/completionsupport.h index 7403ed490050639e4938f0139c57a0608e51a885..6cf43cd6a9121fc577106a363c77f1161cc0594e 100644 --- a/src/plugins/texteditor/completionsupport.h +++ b/src/plugins/texteditor/completionsupport.h @@ -55,6 +55,9 @@ public: CompletionSupport(); static CompletionSupport *instance(); + + bool isActive() const; + public slots: void autoComplete(TextEditor::ITextEditable *editor, bool forced); void quickFix(TextEditor::ITextEditable *editor);