Commit 49fa094f authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Add an action to clear search results to context menu

parent 76a71f48
Pipeline #123911 passed with stage
in 3 minutes and 25 seconds
......@@ -2083,6 +2083,8 @@ void KatePluginSearchView::customResMenuRequested(const QPoint &pos)
menu->addAction(exportMatches);
}
QAction *clear = menu->addAction(i18n("Clear"));
menu->popup(tree->viewport()->mapToGlobal(pos));
connect(copyAll, &QAction::triggered, this, [this](bool) {
......@@ -2094,6 +2096,10 @@ void KatePluginSearchView::customResMenuRequested(const QPoint &pos)
connect(exportMatches, &QAction::triggered, this, [this](bool) {
showExportMatchesDialog();
});
connect(clear, &QAction::triggered, this, [this] {
m_curResults->matchModel.clear();
clearMarksAndRanges();
});
}
void KatePluginSearchView::copySearchToClipboard(CopyResultType copyType)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment