Skip to content

Commit

Permalink
fix(break-pane): strip logical position when inserting pane to new tab (
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif authored Feb 3, 2025
1 parent a853a96 commit 0b9e61c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zellij-server/src/panes/tiled_panes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,13 @@ impl TiledPanes {
})
.copied()
{
if let Some(pane) = self.panes.remove(&pane_id) {
self.add_pane(pane.pid(), pane, true, None);
if let Some(mut pane) = self.panes.remove(&pane_id) {
// we must strip the logical position here because it's likely a straggler from
// this pane's previous tab and would cause chaos if considered in the new one
let mut pane_geom = pane.position_and_size();
pane_geom.logical_position = None;
pane.set_geom(pane_geom);
self.add_pane_with_existing_geom(pane.pid(), pane);
}
}
}
Expand Down

0 comments on commit 0b9e61c

Please sign in to comment.