Merge commit 'origin/1.3'

Conflicts:
	src/plugins/cppeditor/cppeditor.cpp
This commit is contained in:
mae
2009-12-03 18:41:21 +01:00
4 changed files with 16 additions and 9 deletions

View File

@@ -1007,8 +1007,10 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
cursor.insertBlock();
indent(document(), cursor, QChar::Null);
} else {
QString previousBlockText = cursor.block().text();
cursor.insertBlock();
// After inserting the block, to avoid duplicating whitespace on the same line
const QString previousBlockText = cursor.block().previous().text();
cursor.insertText(ts.indentationString(previousBlockText));
}
cursor.endEditBlock();