Commit d92055dd authored by Marco Benelli's avatar Marco Benelli

Fix inserting on extra curly brace upon pressing enter key.

Special handling of the case in which the current token is
Token::RightBrace. This works in every case *except* for nested braces
without separator between them.

Change-Id: Ief625086c4d33ba77b36b1181e78cad124feb7a9
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
parent 13fcf5ad
......@@ -179,6 +179,9 @@ bool AutoCompleter::contextAllowsAutoParentheses(const QTextCursor &cursor,
case Token::Comment:
return false;
case Token::RightBrace:
return false;
case Token::String: {
const QString blockText = cursor.block().text();
const QStringRef tokenText = blockText.midRef(token.offset, token.length);
......
Markdown is supported
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