Commit 4d7444e6 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed the insertion of matching braces when the token at the left of the...

Fixed the insertion of matching braces when the token at the left of the cursor is a string literal.
parent 56df4e29
...@@ -1058,7 +1058,7 @@ bool QmlJSTextEditor::contextAllowsAutoParentheses(const QTextCursor &cursor, co ...@@ -1058,7 +1058,7 @@ bool QmlJSTextEditor::contextAllowsAutoParentheses(const QTextCursor &cursor, co
const QStringRef tokenText = blockText.midRef(token.offset, token.length); const QStringRef tokenText = blockText.midRef(token.offset, token.length);
const QChar quote = tokenText.at(0); const QChar quote = tokenText.at(0);
if (ch == quote && isCompleteStringLiteral(tokenText)) if (ch != quote || isCompleteStringLiteral(tokenText))
break; break;
return false; return false;
......
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