Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Select collab channel filter query upon focusing (#29383)

Julia Ryanc39adc5242dd
diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs
index 6c5328ae190..e8eac4aaf6d 100644
--- a/crates/collab_ui/src/collab_panel.rs
+++ b/crates/collab_ui/src/collab_panel.rs
@@ -65,6 +65,15 @@ pub fn init(cx: &mut App) {
cx.observe_new(|workspace: &mut Workspace, _, _| {
workspace.register_action(|workspace, _: &ToggleFocus, window, cx| {
workspace.toggle_panel_focus::<CollabPanel>(window, cx);
+ if let Some(collab_panel) = workspace.panel::<CollabPanel>(cx) {
+ collab_panel.update(cx, |panel, cx| {
+ panel.filter_editor.update(cx, |editor, cx| {
+ if editor.snapshot(window, cx).is_focused() {
+ editor.select_all(&Default::default(), window, cx);
+ }
+ });
+ })
+ }
});
workspace.register_action(|_, _: &OpenChannelNotes, window, cx| {
let channel_id = ActiveCall::global(cx)