From 4ed2b1cd1431da49467aeb9dae304bee204628af Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 30 Sep 2020 07:33:40 -0700 Subject: [PATCH] wezterm: fix an issue where unzooming wouldn't resize the pane The problem was that the pane resizes got optimized away because the tab size doesn't change as part of the zoom operation. We don't need to run the full resize logic for unzoom though, just need to re-apply the size to the unzoomed pane. We don't have a convenient way to do that, so we re-apply the sizes to all of the panes in the tab. refs: https://github.com/wez/wezterm/issues/157#issuecomment-701173561 --- src/mux/tab.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mux/tab.rs b/src/mux/tab.rs index ac2d07872..1843c56c6 100644 --- a/src/mux/tab.rs +++ b/src/mux/tab.rs @@ -610,7 +610,9 @@ impl Tab { if let Some(pane) = self.get_active_pane() { pane.set_zoomed(false); } - self.resize(size); + + let mut root = self.pane.borrow_mut(); + apply_sizes_from_splits(root.as_mut().unwrap(), &size); } else { // We weren't zoomed, but now we want to zoom. // Locate the active pane