Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
sidebar: Fix space not working in archive view's search editor (#53268)
Danilo Leal5bd78e3f8eb9
diff --git a/crates/agent_ui/src/threads_archive_view.rs b/crates/agent_ui/src/threads_archive_view.rsindex f0c02eefc34..b7afe2c37d0 100644--- a/crates/agent_ui/src/threads_archive_view.rs+++ b/crates/agent_ui/src/threads_archive_view.rs@@ -218,6 +218,13 @@ impl ThreadsArchiveView {handle.focus(window, cx);}+ pub fn is_filter_editor_focused(&self, window: &Window, cx: &App) -> bool {+ self.filter_editor+ .read(cx)+ .focus_handle(cx)+ .is_focused(window)+ }+fn update_items(&mut self, cx: &mut Context<Self>) {let sessions = ThreadMetadataStore::global(cx).read(cx)diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rsindex 53ae57d1a7c..4d3e282c403 100644--- a/crates/sidebar/src/sidebar.rs+++ b/crates/sidebar/src/sidebar.rs@@ -1769,7 +1769,11 @@ impl Sidebar {dispatch_context.add("ThreadsSidebar");dispatch_context.add("menu");- let identifier = if self.filter_editor.focus_handle(cx).is_focused(window) {+ let is_archived_search_focused = matches!(&self.view, SidebarView::Archive(archive) if archive.read(cx).is_filter_editor_focused(window, cx));++ let identifier = if self.filter_editor.focus_handle(cx).is_focused(window)+ || is_archived_search_focused+ {"searching"} else {"not_searching"