Fixed the insertion of matching braces when the token at the left of the cursor is a string literal.

This commit is contained in:
Roberto Raggi
2010-02-10 16:23:33 +01:00
parent 56df4e29ce
commit 4d7444e6cd

View File

@@ -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;