diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp index 0357bb80341..348f0a1eabc 100644 --- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp @@ -263,7 +263,7 @@ void GenericProposalModel::filter(const QString &prefix) const QString lowerPrefix = prefix.toLower(); foreach (const auto &item, m_originalItems) { const QString &text = item->text(); - if (regExp.match(text).hasMatch()) { + if (regExp.match(text).capturedStart() == 0) { m_currentItems.append(item); if (text.startsWith(prefix)) { // Direct match