forked from qt-creator/qt-creator
Automagically hide the completion box when the text under cursor matches the only item in the completion box.
This commit is contained in:
@@ -796,6 +796,11 @@ void CodeCompletion::completions(QList<TextEditor::CompletionItem> *completions)
|
||||
const QString key = m_editor->textAt(m_startPosition, length);
|
||||
|
||||
filter(m_completions, completions, key, FirstLetterCaseSensitive);
|
||||
|
||||
if (completions->size() == 1) {
|
||||
if (key == completions->first().text)
|
||||
completions->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user