Skip to content
Snippets Groups Projects
Commit 7c04d11f authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Automagically hide the completion box when the text under cursor matches the...

Automagically hide the completion box when the text under cursor matches the only item in the completion box.
parent cbf1fe8c
No related branches found
No related tags found
No related merge requests found
...@@ -796,6 +796,11 @@ void CodeCompletion::completions(QList<TextEditor::CompletionItem> *completions) ...@@ -796,6 +796,11 @@ void CodeCompletion::completions(QList<TextEditor::CompletionItem> *completions)
const QString key = m_editor->textAt(m_startPosition, length); const QString key = m_editor->textAt(m_startPosition, length);
filter(m_completions, completions, key, FirstLetterCaseSensitive); filter(m_completions, completions, key, FirstLetterCaseSensitive);
if (completions->size() == 1) {
if (key == completions->first().text)
completions->clear();
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment