diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/forms/searchform.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/forms/searchform.cpp b/src/forms/searchform.cpp index 0e5161f..c05c6b2 100644 --- a/src/forms/searchform.cpp +++ b/src/forms/searchform.cpp @@ -26,9 +26,11 @@ SearchForm::SearchForm(MainWindow *parentWindow, QWidget *parent) : // show/hide action QAction *toggleSearchBox = new QAction(this); toggleSearchBox->setShortcut(QKeySequence(QString::fromStdString(parentWindow->m_config->value<std::string>("browser.shortcuts.toggleSearchBox").value()))); - connect(toggleSearchBox, &QAction::triggered, this, [this]() { + connect(toggleSearchBox, &QAction::triggered, this, [this, parentWindow]() { if(isVisible()) { setVisible(false); + // remove highlighting by passing an empty string + parentWindow->m_currentView->findText(""); } else { setVisible(true); setFocus(); |