From aacb17ef38047e12548352d11b62402694891ce6 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 18 Jan 2024 09:49:02 +0200 Subject: [PATCH] Fix buffer search focus not working When the Deploy action is called in the buffer with the buffer search bar already deployed, the focus should be on the search bar. --- crates/search/src/buffer_search.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index a1f0d9773b..f4c9f7ef0f 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -638,6 +638,12 @@ impl BufferSearchBar { registrar.register_handler(|this, _: &editor::actions::Cancel, cx| { this.dismiss(&Dismiss, cx); }); + + // register deploy buffer search for both search bar states, since we want to focus into the search bar + // when the deploy action is triggered in the buffer. + registrar.register_handler(|this, deploy, cx| { + this.deploy(deploy, cx); + }); registrar.register_handler_for_dismissed_search(|this, deploy, cx| { this.deploy(deploy, cx); })