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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isQmlFile) {
|
if (isQmlFile && (completionOperator.isNull() || completionOperator.isSpace() || isDelimiter(completionOperator))) {
|
||||||
if (completionOperator.isNull()
|
updateSnippets();
|
||||||
|| completionOperator.isSpace()
|
m_completions.append(m_snippets);
|
||||||
|| completionOperator == QLatin1Char('{')
|
|
||||||
|| completionOperator == QLatin1Char('}')
|
|
||||||
|| completionOperator == QLatin1Char(':')
|
|
||||||
|| completionOperator == QLatin1Char(';')) {
|
|
||||||
updateSnippets();
|
|
||||||
m_completions.append(m_snippets);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! m_completions.isEmpty())
|
if (! m_completions.isEmpty())
|
||||||
|
|||||||
Reference in New Issue
Block a user