Editor: Propose full trigger match snippets

Snippets might insert a lot more text than just the completion item text
so don't hide a completion if the trigger is typed in completely. But do
not show completions when we type in a snippet with a trigger that can
be also interpreted as a keyword or ordinary completion item.

Change-Id: I25afe5f566e1c8f30621e2f82356c1c5f0af1311
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-08-13 10:38:50 +02:00
parent 96474eecc7
commit f95659403b

View File

@@ -217,7 +217,8 @@ bool GenericProposalModel::isPerfectMatch(const QString &prefix) const
if (proposalItem(i)->isKeyword()) if (proposalItem(i)->isKeyword())
return true; return true;
hasFullMatch = true; if (!proposalItem(i)->isSnippet())
hasFullMatch = true;
} }
} }