forked from qt-creator/qt-creator
Editor: fix indenting selections spanning multiple lines
Fixes: QTCREATORBUG-27365 Change-Id: Ibf98bf832e93598fd5d08cb6d5f6422e88480b63 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -164,11 +164,10 @@ MultiTextCursor TextDocumentPrivate::indentOrUnindent(const MultiTextCursor &cur
|
||||
}
|
||||
// make sure that selection that begins in first column stays at first column
|
||||
// even if we insert text at first column
|
||||
if (cursorAtBlockStart) {
|
||||
cursor = textCursor;
|
||||
if (cursorAtBlockStart) {
|
||||
cursor.setPosition(startBlock.position(), QTextCursor::KeepAnchor);
|
||||
} else if (anchorAtBlockStart) {
|
||||
cursor = textCursor;
|
||||
cursor.setPosition(startBlock.position(), QTextCursor::MoveAnchor);
|
||||
cursor.setPosition(textCursor.position(), QTextCursor::KeepAnchor);
|
||||
}
|
||||
|
Reference in New Issue
Block a user