forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user