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.
This commit is contained in:
Kirill Bulatov committed 2024-01-18 10:51:28 +02:00
1 parent 88fd405d35
commit 67159f9a99
1 file changed
+6
+6
View File
@@ -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);
})