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:
Orgad Shaneh
2013-01-09 21:41:24 +02:00
committed by Orgad Shaneh
parent ff0ec4d798
commit 38f6c349e1

View File

@@ -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