summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2023-04-03 18:04:03 +0200
committerAram Drevekenin <aram@poor.dev>2023-04-03 18:04:03 +0200
commit1ef001194f935b821ddaa037a89217243903a093 (patch)
tree53be9d8252ec2c14b06821600bc6d2fbb9efaa9a
parentdf8db1d2e7af592958a1a566fe975b0ab9ea577a (diff)
fix(layout): pane focus in stackfix-stack-focus-glitch
-rw-r--r--zellij-server/src/panes/tiled_panes/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/zellij-server/src/panes/tiled_panes/mod.rs b/zellij-server/src/panes/tiled_panes/mod.rs
index 4cc7279d7..08a633b0a 100644
--- a/zellij-server/src/panes/tiled_panes/mod.rs
+++ b/zellij-server/src/panes/tiled_panes/mod.rs
@@ -1434,6 +1434,10 @@ impl TiledPanes {
.iter()
.map(|(cid, pid)| (*cid, *pid))
.collect();
+ let clients_need_to_be_moved = active_panes.iter().any(|(_c_id, p_id)| *p_id == pane_id);
+ if !clients_need_to_be_moved {
+ return;
+ }
// find the most recently active pane
let mut next_active_pane_candidates: Vec<(&PaneId, &Box<dyn Pane>)> = self
@@ -1456,9 +1460,7 @@ impl TiledPanes {
.map(|p| p.current_geom().is_stacked)
.unwrap_or(false)
{
- let _ = StackedPanes::new_from_btreemap(&mut self.panes, &self.panes_to_hide)
- .expand_pane(&next_active_pane_id);
- self.reapply_pane_frames();
+ self.expand_pane_in_stack(next_active_pane_id);
}
for (client_id, active_pane_id) in active_panes {
if active_pane_id == pane_id {