Automagically hide the completion box when the text under cursor matches the only item in the completion box.

This commit is contained in:
Roberto Raggi
2010-03-29 10:49:21 +02:00
parent cbf1fe8c3a
commit 7c04d11f44

View File

@@ -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();
}
}
}