Commit e8ce2e62 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CodeAssist: Do not retrigger completion when applying a snippet

This fixes the following case for the ClangCodeModel:

 1. Trigger non-member/non-prefix completion.
 2. Choose the generic "class" snippet.
    --> The snippet is inserted, cursor is right after "name", but it
        also triggers another completion that proposes e.g. the "namespace"

This does not happen with the built-in code model because at that cursor
position it provides "name" as completion result, which is a perfect
match and thus suppresses the completion list.

Change-Id: I2f797469b2a0952406b50c28f9704b113e19b16d
Reviewed-by: Ivan Donchevskii's avatarIvan Donchevskii <>
Reviewed-by: David Schulz's avatarDavid Schulz <>
parent 43d6726c
......@@ -350,7 +350,8 @@ void CodeAssistantPrivate::processProposalItem(AssistProposalItemInterface *prop
TextDocumentManipulator manipulator(m_editorWidget);
proposalItem->apply(manipulator, m_proposal->basePosition());
if (!proposalItem->isSnippet())
void CodeAssistantPrivate::handlePrefixExpansion(const QString &newPrefix)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment