Skip to content

settings_ui: Match all query words in search#56835

Merged
probably-neb merged 1 commit into
mainfrom
fix-issue-56244-ec4b8b31b049f1d8
May 15, 2026
Merged

settings_ui: Match all query words in search#56835
probably-neb merged 1 commit into
mainfrom
fix-issue-56244-ec4b8b31b049f1d8

Conversation

@yeskunall

Copy link
Copy Markdown
Member

Settings search treated multi-word queries as OR, so “tab size” matched any document whose words contained a prefix of “tab” or “size” -- flooding results with unrelated entries like “Show Tab Bar” and “Maximum Tabs”.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #56244.

Release Notes:

  • Fixed settings UI search returning unrelated results for multi-word queries

Settings search treated multi-word queries as OR, so "tab size" matched
any document whose words contained a prefix of "tab" or "size" —
flooding results with unrelated entries like "Show Tab Bar" and
"Maximum Tabs".

Switch the exact-match filter to require every query word to have a
prefix match in the document, and guard the empty query_words case so
whitespace-only queries do not match every document (since
`[].iter().all(...)` returns `true`).
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 15, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 15, 2026
@probably-neb probably-neb added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit b224588 May 15, 2026
43 checks passed
@probably-neb probably-neb deleted the fix-issue-56244-ec4b8b31b049f1d8 branch May 15, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Search setttings" should only return those matching all words, not any

2 participants