cleanWhitespace() checkes whether it has to change indentation or not. handle that.

This commit is contained in:
Roopesh Chander
2009-10-31 15:26:45 +05:30
committed by Thorbjørn Lindeijer
parent fde766016a
commit 9822fb65df
3 changed files with 7 additions and 5 deletions

View File

@@ -327,7 +327,7 @@ void BaseTextDocument::cleanWhitespace(QTextCursor& cursor, bool cleanIndentatio
cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor, trailing);
cursor.removeSelectedText();
}
if (cleanIndentation && !m_tabSettings.isIndentationClean(blockText)) {
if (cleanIndentation && !m_tabSettings.isIndentationClean(block)) {
cursor.setPosition(block.position());
int firstNonSpace = m_tabSettings.firstNonSpace(blockText);
if (firstNonSpace == blockText.length()) {