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.

pane: Always notify status bar items on Pane::Focused events (#10275)

Piotr Osiewiczf0d4d71e97f1
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index 6f25af48b9d..e2909593339 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -2315,11 +2315,13 @@ impl Workspace {
}
fn handle_pane_focused(&mut self, pane: View<Pane>, cx: &mut ViewContext<Self>) {
+ // This is explicitly hoisted out of the following check for pane identity as
+ // terminal panel panes are not registered as a center panes.
+ self.status_bar.update(cx, |status_bar, cx| {
+ status_bar.set_active_pane(&pane, cx);
+ });
if self.active_pane != pane {
self.active_pane = pane.clone();
- self.status_bar.update(cx, |status_bar, cx| {
- status_bar.set_active_pane(&self.active_pane, cx);
- });
self.active_item_path_changed(cx);
self.last_active_center_pane = Some(pane.downgrade());
}