forked from qt-creator/qt-creator
CodeAssist: Ensure perfect match for keywords
...as otherwise the completion windows stays open and gets in the way. Fixes: QTCREATORBUG-21767 Change-Id: Ib0a841b9d9de52109439f067c466478744361814 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -214,8 +214,13 @@ bool GenericProposalModel::isPerfectMatch(const QString &prefix) const
|
||||
if (match == PerfectMatchType::StartsWith)
|
||||
return false;
|
||||
|
||||
if (!hasFullMatch && match == PerfectMatchType::Full)
|
||||
hasFullMatch = true;
|
||||
if (match == PerfectMatchType::Full) {
|
||||
if (proposalItem(i)->isKeyword())
|
||||
return true;
|
||||
|
||||
if (!hasFullMatch)
|
||||
hasFullMatch = true;
|
||||
}
|
||||
}
|
||||
|
||||
return hasFullMatch;
|
||||
|
||||
Reference in New Issue
Block a user