forked from qt-creator/qt-creator
Clang: Show full completion match first
If prefix is equal to some completion then show it before anything else. Task-number: QTCREATORBUG-15445 Change-Id: I976da4a829b818e843d31a76d2818eb5bbedda93 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -316,7 +316,9 @@ void GenericProposalModel::filter(const QString &prefix)
|
||||
m_currentItems.append(item);
|
||||
if (text.startsWith(prefix)) {
|
||||
// Direct match
|
||||
item->setPrefixMatch(AssistProposalItemInterface::PrefixMatch::Exact);
|
||||
item->setPrefixMatch(text.length() == prefix.length()
|
||||
? AssistProposalItemInterface::PrefixMatch::Full
|
||||
: AssistProposalItemInterface::PrefixMatch::Exact);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user