Skip to content

Commit 857450e

Browse files
committed
Workspace key context now includes indentifiers for the state of the
docks.
1 parent de8da53 commit 857450e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

crates/workspace/src/workspace.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6367,6 +6367,24 @@ impl Render for Workspace {
63676367
}
63686368
}
63696369

6370+
if self.left_dock.read(cx).is_open() {
6371+
if let Some(active_panel) = self.left_dock.read(cx).active_panel() {
6372+
context.set("left_dock", active_panel.panel_key());
6373+
}
6374+
}
6375+
6376+
if self.right_dock.read(cx).is_open() {
6377+
if let Some(active_panel) = self.right_dock.read(cx).active_panel() {
6378+
context.set("right_dock", active_panel.panel_key());
6379+
}
6380+
}
6381+
6382+
if self.bottom_dock.read(cx).is_open() {
6383+
if let Some(active_panel) = self.bottom_dock.read(cx).active_panel() {
6384+
context.set("bottom_dock", active_panel.panel_key());
6385+
}
6386+
}
6387+
63706388
let centered_layout = self.centered_layout
63716389
&& self.center.panes().len() == 1
63726390
&& self.active_item(cx).is_some();

0 commit comments

Comments
 (0)