project replace feature will replace what was last found instead of what is in the field
Summary
In the project search window:
- search for
test01a - switch search field to
test01b - press the replace all button
test01a will be replaced.
Zed Version and System Specs
Zed: v0.186.6 (Zed Preview) OS: Linux X11 ubuntu 24.04 Memory: 7.7 GiB Architecture: x86_64 GPU: NVIDIA GeForce GTX 1050 Ti || NVIDIA || 550.144.03
This probably isn't technically a "bug". But it's something to consider.
One thought is disabling replace if the search field has changed, and then re-enabling it after a search has been run.
Just hit this. Immensely confusing behavior. Just checking what VSCode does here, is that they always re-search on change in the search input (rather than waiting for a submit action from the user). That way the UI is always in sync. Disabling the replace (when results and search value are out of sync) would at least protect users for now.
Closing in favor of:
- https://github.com/zed-industries/zed/issues/34897