texteditor: Add Select Next Match function

Adds an Action to select the next occurrence(s) of the currently selected text.

Change-Id: I37e23a3c2d1651ec4898fac53d75044d92ed7079
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-04-11 14:43:47 +02:00
parent 70dde948ed
commit cf81ff2a29
4 changed files with 46 additions and 0 deletions

View File

@@ -329,6 +329,10 @@ void TextEditorActionHandlerPrivate::createActions()
[] (TextEditorWidget *w) { w->copyLine(); }, false, tr("Copy &Line"),
QKeySequence(tr("Ctrl+Ins")),
G_EDIT_TEXT, advancedEditMenu);
registerAction(ADD_SELECT_NEXT_FIND_MATCH,
[] (TextEditorWidget *w) { w->addSelectionNextFindMatch(); }, false, tr("Add Selection to Next Find Match"),
QKeySequence(tr("Ctrl+D")),
G_EDIT_TEXT, advancedEditMenu);
m_modifyingActions << registerAction(DUPLICATE_SELECTION,
[] (TextEditorWidget *w) { w->duplicateSelection(); }, false, tr("&Duplicate Selection"),
QKeySequence(),