fix(break-pane): strip logical position when inserting pane to new tab (#3973)

This commit is contained in:
Aram Drevekenin 2025-02-03 11:04:22 +01:00 committed by GitHub
parent a853a96d89
commit 0b9e61cdba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -216,8 +216,13 @@ impl TiledPanes {
}) })
.copied() .copied()
{ {
if let Some(pane) = self.panes.remove(&pane_id) { if let Some(mut pane) = self.panes.remove(&pane_id) {
self.add_pane(pane.pid(), pane, true, None); // 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);
} }
} }
} }