Commit df12df8c authored by Leandro Melo's avatar Leandro Melo
Browse files

Fix QML auto completer

parent bc466562
...@@ -279,9 +279,9 @@ QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor, ...@@ -279,9 +279,9 @@ QString AutoCompleter::insertMatchingBrace(const QTextCursor &cursor,
QString AutoCompleter::insertParagraphSeparator(const QTextCursor &cursor) const QString AutoCompleter::insertParagraphSeparator(const QTextCursor &cursor) const
{ {
if (shouldInsertNewline(cursor)) { if (shouldInsertNewline(cursor)) {
QTextCursor cursor = cursor; QTextCursor selCursor = cursor;
cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor); selCursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
if (! cursor.selectedText().trimmed().isEmpty()) if (! selCursor.selectedText().trimmed().isEmpty())
return QString(); return QString();
return QLatin1String("}\n"); return QLatin1String("}\n");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment