forked from qt-creator/qt-creator
Add the snippets to the completion box when the character at the left of the text cursor is a delimiter.
This commit is contained in:
@@ -919,16 +919,9 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (isQmlFile) {
|
||||
if (completionOperator.isNull()
|
||||
|| completionOperator.isSpace()
|
||||
|| completionOperator == QLatin1Char('{')
|
||||
|| completionOperator == QLatin1Char('}')
|
||||
|| completionOperator == QLatin1Char(':')
|
||||
|| completionOperator == QLatin1Char(';')) {
|
||||
updateSnippets();
|
||||
m_completions.append(m_snippets);
|
||||
}
|
||||
if (isQmlFile && (completionOperator.isNull() || completionOperator.isSpace() || isDelimiter(completionOperator))) {
|
||||
updateSnippets();
|
||||
m_completions.append(m_snippets);
|
||||
}
|
||||
|
||||
if (! m_completions.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user