forked from qt-creator/qt-creator
Editor: Add action to select word under cursor
Task-number: QTCREATORBUG-641 Change-Id: I83e2705c7250646b13cd3ec52779a1496e6a472c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1357,6 +1357,15 @@ bool TextEditorWidget::selectBlockDown()
|
||||
return true;
|
||||
}
|
||||
|
||||
void TextEditorWidget::selectWordUnderCursor()
|
||||
{
|
||||
QTextCursor tc = textCursor();
|
||||
if (tc.hasSelection())
|
||||
return;
|
||||
tc.select(QTextCursor::WordUnderCursor);
|
||||
setTextCursor(tc);
|
||||
}
|
||||
|
||||
void TextEditorWidget::copyLineUp()
|
||||
{
|
||||
d->copyLineUpDown(true);
|
||||
|
||||
Reference in New Issue
Block a user