From 42e135e5b03749afac12c46eaa366de26a3cf9af Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 29 Sep 2020 20:12:43 -0700 Subject: [PATCH] wezterm: fix resize crash Repro steps were: * Split horizontal * Resize y to be shorter; size shrinks to zero * Resize y to be taller; size grows to u16::max and then overflows The return statement was missing; probably a copy-n-paste-o as the equivalent logic for the x size adjustment had it. closes: https://github.com/wez/wezterm/issues/276 --- src/mux/tab.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mux/tab.rs b/src/mux/tab.rs index 1c48cc24c..ac2d07872 100644 --- a/src/mux/tab.rs +++ b/src/mux/tab.rs @@ -412,6 +412,7 @@ fn adjust_y_size(tree: &mut Tree, mut y_adjust: isize, cell_dimensions: &PtySize data.second.rows = data.first.rows; data.second.pixel_height = data.first.pixel_height; } + return; } SplitDirection::Vertical if y_adjust > 0 => { adjust_y_size(&mut *left, 1, cell_dimensions);