C++: Only reindent on electric characters if indent wasn't user-changed.

This should make the indenter less strict and annoying for non-standard
indentation styles.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-09-08 16:18:58 +02:00
parent 2989ac1d69
commit 5cd6ebfdfd
3 changed files with 16 additions and 1 deletions

View File

@@ -470,6 +470,12 @@ int CodeFormatter::indentFor(const QTextBlock &block)
return m_indentDepth;
}
int CodeFormatter::indentForNewLineAfter(const QTextBlock &block)
{
restoreCurrentState(block);
return m_indentDepth;
}
void CodeFormatter::updateStateUntil(const QTextBlock &endBlock)
{
QStack<State> previousState = initialState();