diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 0e64e0c61ff..6ba536f9b63 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -6316,7 +6316,8 @@ void TextEditorWidgetPrivate::autocompleterHighlight(const QTextCursor &cursor) m_autoCompleteHighlightPos.clear(); } else if (m_highlightAutoComplete) { m_autoCompleteHighlightPos.push_back(cursor); - } else if (m_animateAutoComplete) { + } + if (m_animateAutoComplete) { const QTextCharFormat &matchFormat = q->textDocument()->fontSettings().toTextCharFormat(C_AUTOCOMPLETE); cancelCurrentAnimations();// one animation is enough