forked from qt-creator/qt-creator
TextEditor: Fix requesting more proposals than needed
Since
commit d61d29cf16
Introduce a basic client for the language server protocol
extra proprosals were requested in the fragile case on a change
notification, e.g. for function signature completion. Restrict this to
the language client proposal, as it was actually intended.
The language client does not support prefixes, so introduce this concept
for deciding whether to request new proposals or not.
Done-with: David Schulz
Change-Id: Ibc1ad82dbeeea93b85f279c59b8c7289fe6ec726
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -440,7 +440,7 @@ void CodeAssistantPrivate::notifyChange()
|
||||
QTC_ASSERT(m_proposal, return);
|
||||
if (m_editorWidget->position() < m_proposal->basePosition()) {
|
||||
destroyContext();
|
||||
} else if (!m_proposal->isFragile()) {
|
||||
} else if (m_proposal->supportsPrefix()) {
|
||||
m_proposalWidget->updateProposal(
|
||||
m_editorWidget->textAt(m_proposal->basePosition(),
|
||||
m_editorWidget->position() - m_proposal->basePosition()));
|
||||
|
||||
Reference in New Issue
Block a user