forked from qt-creator/qt-creator
Completions: move continuations upper in proposals list.
Since fuzzy completions are allowed, the lexicographically first proposal is not necessarily most relevant. The patch modifies sorting of proposals so that the exact match and continuations go first, and fuzzy completions follow. Moreover, being a continuation seem to be a more important characteristic of a proposal, than being it a function argument or keyword etc. That's why the check for continuation is placed before the check for order. Task-number: QTCREATORBUG-8737 Task-number: QTCREATORBUG-9236 Change-Id: I89aae9d2ce6bfa59af7c2f75e6f3af00212008ca Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Alexey Zhondin <lexxmark.dev@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
adee8336bb
commit
da4c4b80f3
@@ -448,7 +448,7 @@ bool GenericProposalWidget::updateAndCheck(const QString &prefix)
|
||||
return false;
|
||||
}
|
||||
if (d->m_model->isSortable(prefix))
|
||||
d->m_model->sort();
|
||||
d->m_model->sort(prefix);
|
||||
d->m_completionListView->reset();
|
||||
|
||||
// Try to find the previosly explicit selection (if any). If we can find the item set it
|
||||
|
||||
Reference in New Issue
Block a user