Fix Replace Next Match command (#30890)

Currently, `search::ReplaceNext` works only first time it is executed
because Zed switches the focus to the editor. It seems
`self.editor_focus` call is unnecessary.

Closes #17466

Release Notes:

- Fixed `Replace Next Match` command. Previously it worked once, then
Zed incorrectly switched the focus to the editor


https://github.com/user-attachments/assets/66ef61d6-1efe-43ca-8d8c-6b40540a9930
This commit is contained in:
Aleksei Gusev 2025-05-21 13:05:44 +03:00 committed by GitHub
parent 8061bacee3
commit d61a544400
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1460,7 +1460,6 @@ impl BufferSearchBar {
self.select_next_match(&SelectNextMatch, window, cx);
}
should_propagate = false;
self.focus_editor(&FocusEditor, window, cx);
}
}
}