Respect regex assertions more faithfully with search (#62158)
- **project_search: Add failing test for regex searches with
assertions**
- **project_search: Improve handling of regex assertions**
# Objective
Fixes #55995 by removing a faulty optimization path for regex searches.
## Solution
## Testing
We've added 3 extra tests for the changed behavior.
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
## Showcase
> This section is optional. If this PR does not include a visual change
or does not add a new user-facing feature, you can delete this section.
- Help others understand the result of this PR by showcasing your
awesome work!
- If this PR includes a visual change, consider adding a screenshot,
GIF, or video
- A before/after comparison is very useful for changes to existing
features!
While a showcase should aim to be brief and digestible, you can use a
toggleable section to save space on longer showcases:
<details>
<summary>Click to view showcase</summary>
My super cool demos here
</details>
---
Release Notes:
- Improved handling of regexes in project/buffer searches
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
1ade7854f2Piotr Osiewicz committed on 8/4/2026, 11:23:39 AM· committed by GitHubparent184e124