C++ indenter: Fix curly brace placement for ANSI style.

There was a bug in 5cd6ebfdfd which meant
no reindent of the current line was triggered for the opening curly
brace on a new line.

Task-number: QTCREATORBUG-2331
This commit is contained in:
Christian Kamm
2010-09-15 11:12:32 +02:00
parent e5cbb56fe7
commit d68e9e1a4d

View File

@@ -477,6 +477,11 @@ void CodeFormatter::indentForNewLineAfter(const QTextBlock &block, int *indent,
restoreCurrentState(block);
*indent = m_indentDepth;
*padding = m_paddingDepth;
int lexerState = loadLexerState(block);
m_tokens.clear();
m_currentLine.clear();
adjustIndent(m_tokens, lexerState, indent, padding);
}
void CodeFormatter::updateStateUntil(const QTextBlock &endBlock)