forked from qt-creator/qt-creator
Merge commit 'origin/1.3'
Conflicts: src/plugins/cppeditor/cppeditor.cpp
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user