From 97f50244f60a5eea4503d10902e3e0c5275d1294 Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Wed, 30 Sep 2026 16:04:38 +0800 Subject: [PATCH] fix: show mismatch alert for ReplaceBar when keyword is not found The ReplaceBar branch passed false to setMismatchAlert() in both the empty-keyword and the non-empty-keyword case, ignoring the highlight result, so the mismatch alert never showed for the replace bar. The FindBar branch above already uses !findKeyword; align ReplaceBar with it. Log: Influence: find/replace bar -- --- src/widgets/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index a1801369..b2ecb897 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -3894,8 +3894,8 @@ void Window::handleUpdateSearchKeyword(QWidget *widget, const QString &file, con replaceBarWidget->setMismatchAlert(false); qDebug() << "empty keyword, set mismatch alert false"; } else { - replaceBarWidget->setMismatchAlert(false); - qDebug() << "not empty keyword, set mismatch alert false"; + replaceBarWidget->setMismatchAlert(!findKeyword); + qDebug() << "not empty keyword, set mismatch alert " << !findKeyword; } } }