1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

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
This commit is contained in:
Wez Furlong 2020-09-29 20:12:43 -07:00
parent 53c63267e8
commit 42e135e5b0

View File

@ -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);