forked from qt-creator/qt-creator
Fixed the insertion of matching braces when the token at the left of the cursor is a string literal.
This commit is contained in:
@@ -1058,7 +1058,7 @@ bool QmlJSTextEditor::contextAllowsAutoParentheses(const QTextCursor &cursor, co
|
||||
const QStringRef tokenText = blockText.midRef(token.offset, token.length);
|
||||
const QChar quote = tokenText.at(0);
|
||||
|
||||
if (ch == quote && isCompleteStringLiteral(tokenText))
|
||||
if (ch != quote || isCompleteStringLiteral(tokenText))
|
||||
break;
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user