forked from qt-creator/qt-creator
Improve Copy/CutLine actions usability
This patch implements two features: 1. Reimplement CopyLine to move text cursor at the beginning of line 2. Add copy/cutLine action to Advanced Edit menu, to make it discoverable for editor users. Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18 Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
committed by
David Schulz
parent
f3973ebcfd
commit
fa998d2d2c
@@ -5060,6 +5060,8 @@ void BaseTextEditorWidget::copyLine()
|
||||
QTextCursor prevCursor = textCursor();
|
||||
maybeSelectLine();
|
||||
copy();
|
||||
if (!prevCursor.hasSelection())
|
||||
prevCursor.movePosition(QTextCursor::StartOfBlock);
|
||||
setTextCursor(prevCursor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user