Prevent editor focus after find and replace operations
Release Notes:
- Fix an inconsistent behavior in the buffer "find and replace" UI where focus would be given to the editor after a replacement is made.
When using the find and replace bar in an editor, using only the 'find' operation maintains the focus on the search bar after hitting enter to activate the next match in the editor buffer. But when using replace the editor received focus and surprisingly the next time you hit enter, the match is replaced with a newline in the editor instead of replacing the next match.
I doubt this one line is sufficient to cover every case, but when I built and tested Zed this fixed the problem in the couple of cases where I ran into the problem.
I haven't added any tests yet. This PR can be closed while someone else hops on board with the task, otherwise I'm happy to move along with some suggestions.
| Warnings | |
|---|---|
| :warning: |
This PR is missing release notes. Please add a "Release Notes" section that describes the change:
If your change is not user-facing, you can use "N/A" for the entry:
|
Generated by :no_entry_sign: dangerJS against e94818d76db29343dc7ebed97d82bb45fd8d3a46
Sorry again for overlooking, superseded by https://github.com/zed-industries/zed/pull/30890