Files
zed/crates/search
Xin Zhao d6d4fbbce0 project: Treat replacement literally when dealing non-ASCII text search (#56123)
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 is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #55503

In #28752, to support case-insensitive search for non-ASCII queries, Zed
internally falls back to a regex search. However, this also affected the
replacement behavior, as the replacement code implemented a simple match
logic:

https://github.com/zed-industries/zed/blob/ae6b48c423d3e429ffd242c2771d65ae450640af/crates/project/src/search.rs#L452-L457
Since the regex fallback is an internal implementation detail (the user
never enabled regex mode), the replacement should behave the same as a
normal text replacement. This PR fixes that.

Release Notes:

- Fixed replacement text being treated as a regex pattern when
performing case-insensitive text search with non-ASCII characters.
2026-06-01 06:34:37 +00:00
..