diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 050cd7d5555af9a2432afbd323c8c3446d1589b8..a4eb6c008e99026e9aeac7d8990c8f4104b5a903 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -326,6 +326,7 @@ impl Pane { } self.update_active_toolbar(cx); self.focus_active_item(cx); + self.activate(cx); cx.notify(); } } diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 0ad3a1e5e35ad0cce16c2f6bf2c40f5cf03293db..85d5566e047417f88d7a7ccd6b49508d7d039e4a 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -1028,12 +1028,14 @@ impl Workspace { } fn activate_pane(&mut self, pane: ViewHandle, cx: &mut ViewContext) { - self.active_pane = pane; - self.status_bar.update(cx, |status_bar, cx| { - status_bar.set_active_pane(&self.active_pane, cx); - }); - cx.focus(&self.active_pane); - cx.notify(); + if self.active_pane != pane { + self.active_pane = pane; + self.status_bar.update(cx, |status_bar, cx| { + status_bar.set_active_pane(&self.active_pane, cx); + }); + cx.focus(&self.active_pane); + cx.notify(); + } } fn handle_pane_event(