From f95659403ba232b13c165a3a986cd0e0a64f5144 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 13 Aug 2020 10:38:50 +0200 Subject: [PATCH] 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 --- src/plugins/texteditor/codeassist/genericproposalmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp index 75dcf2d540b..9ab4c0e91e0 100644 --- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp @@ -217,7 +217,8 @@ bool GenericProposalModel::isPerfectMatch(const QString &prefix) const if (proposalItem(i)->isKeyword()) return true; - hasFullMatch = true; + if (!proposalItem(i)->isSnippet()) + hasFullMatch = true; } }