From d61a5444004ff694353a82b3cde4ff54c13e2e0e Mon Sep 17 00:00:00 2001 From: Aleksei Gusev Date: Wed, 21 May 2025 13:05:44 +0300 Subject: [PATCH] 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 --- crates/search/src/buffer_search.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index 5272db35de..20d6e4006c 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -1460,7 +1460,6 @@ impl BufferSearchBar { self.select_next_match(&SelectNextMatch, window, cx); } should_propagate = false; - self.focus_editor(&FocusEditor, window, cx); } } }