forked from qt-creator/qt-creator
cleanWhitespace() checkes whether it has to change indentation or not. handle that.
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
fde766016a
commit
9822fb65df
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user