diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/languageclient/languageclientcompletionassist.cpp | 1 | ||||
-rw-r--r-- | src/plugins/texteditor/codeassist/codeassistant.cpp | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/languageclient/languageclientcompletionassist.cpp b/src/plugins/languageclient/languageclientcompletionassist.cpp index 0ab76a10c0..baac3b007e 100644 --- a/src/plugins/languageclient/languageclientcompletionassist.cpp +++ b/src/plugins/languageclient/languageclientcompletionassist.cpp @@ -447,7 +447,6 @@ void LanguageClientCompletionAssistProcessor::handleCompletionResponse( model); proposal->m_document = m_document; proposal->m_pos = m_pos; - proposal->setFragile(true); proposal->setSupportsPrefix(false); setAsyncProposalAvailable(proposal); m_client->removeAssistProcessor(this); diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index 11434f83f4..6613042c52 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -155,7 +155,8 @@ void CodeAssistantPrivate::invoke(AssistKind kind, IAssistProvider *provider) stopAutomaticProposalTimer(); - if (isDisplayingProposal() && m_assistKind == kind && !m_proposal->isFragile()) { + if (isDisplayingProposal() && m_assistKind == kind && !m_proposal->isFragile() + && m_proposal->supportsPrefix()) { m_proposalWidget->setReason(ExplicitlyInvoked); m_proposalWidget->updateProposal(m_editorWidget->textAt( m_proposal->basePosition(), @@ -324,8 +325,10 @@ void CodeAssistantPrivate::displayProposal(IAssistProposal *newProposal, AssistR // TODO: The proposal should own the model until someone takes it explicitly away. QScopedPointer<IAssistProposal> proposalCandidate(newProposal); - if (isDisplayingProposal() && !m_proposal->isFragile()) + if (isDisplayingProposal() && !m_proposal->isFragile() + && !m_proposalWidget->supportsModelUpdate(proposalCandidate->id())) { return; + } int basePosition = proposalCandidate->basePosition(); if (m_editorWidget->position() < basePosition) { |