Repository navigation
fix: show mismatch alert for ReplaceBar when keyword is not found - #630
Merged
deepin-bot[bot] merged 1 commit intoOct 8, 2026
Merged
Conversation
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 --
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes ReplaceBar’s non-empty keyword path to honor the search result and show a mismatch alert when the keyword is not found, matching FindBar behavior while preserving the existing empty-keyword handling. Sequence diagram for ReplaceBar mismatch alert handlingsequenceDiagram
participant ReplaceBar
participant Window
participant Search
ReplaceBar->>Window: handleUpdateSearchKeyword(widget, file, keyword)
Window->>Search: findKeyword
alt keyword is empty
Window->>ReplaceBar: setMismatchAlert(false)
else keyword is not empty
alt keyword is found
Window->>ReplaceBar: setMismatchAlert(false)
else keyword is not found
Window->>ReplaceBar: setMismatchAlert(true)
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
lzwind
approved these changes
Oct 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/retest |
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unknown) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Window::handleUpdateSearchKeyword()中 ReplaceBar 分支的空关键词与非空关键词两个分支都调用setMismatchAlert(false),已计算出的高亮结果findKeyword被忽略——替换栏关键词未命中时永不显示 mismatch 告警。上方 FindBar 分支正确使用了setMismatchAlert(!findKeyword),两分支行为不一致,疑为复制粘贴遗漏。修复
ReplaceBar else 分支改为与 FindBar 一致的
setMismatchAlert(!findKeyword)。背景
该问题由 AI 辅助单测(PMS 缺陷热点补强,编写 BUG65228 回归用例时审查发现)。
Summary by Sourcery
Bug Fixes: