forked from qt-creator/qt-creator
TextEditor: Keep cursor in beginning of line on moveLineUpDown
Moving it to line end scrolls right with long lines Change-Id: I1fb0cb072a6c57b7e7e53b258567f6842b845fb0 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
ff0ec4d798
commit
38f6c349e1
@@ -1138,8 +1138,10 @@ void BaseTextEditorWidget::moveLineUpDown(bool up)
|
||||
int end = move.position();
|
||||
|
||||
if (hasSelection) {
|
||||
move.setPosition(end);
|
||||
move.setPosition(start, QTextCursor::KeepAnchor);
|
||||
} else {
|
||||
move.setPosition(start);
|
||||
move.setPosition(end, QTextCursor::KeepAnchor);
|
||||
}
|
||||
|
||||
//update positions of affectedMarkers
|
||||
|
||||
Reference in New Issue
Block a user