mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-23 09:11:40 +03:00
fix(layout): pane focus in stack (#2344)
This commit is contained in:
parent
df8db1d2e7
commit
809e3d8d21
@ -1434,6 +1434,10 @@ impl TiledPanes {
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|(cid, pid)| (*cid, *pid))
|
.map(|(cid, pid)| (*cid, *pid))
|
||||||
.collect();
|
.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
|
// find the most recently active pane
|
||||||
let mut next_active_pane_candidates: Vec<(&PaneId, &Box<dyn Pane>)> = self
|
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)
|
.map(|p| p.current_geom().is_stacked)
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
let _ = StackedPanes::new_from_btreemap(&mut self.panes, &self.panes_to_hide)
|
self.expand_pane_in_stack(next_active_pane_id);
|
||||||
.expand_pane(&next_active_pane_id);
|
|
||||||
self.reapply_pane_frames();
|
|
||||||
}
|
}
|
||||||
for (client_id, active_pane_id) in active_panes {
|
for (client_id, active_pane_id) in active_panes {
|
||||||
if active_pane_id == pane_id {
|
if active_pane_id == pane_id {
|
||||||
|
Loading…
Reference in New Issue
Block a user