1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-11 22:37:11 +03:00

fix split size after unzooming, when the window size is unchanged

refs: https://github.com/wez/wezterm/issues/3111
refs: https://github.com/wez/wezterm/issues/3068
This commit is contained in:
Wez Furlong 2023-03-19 09:25:04 -07:00
parent 7a6dce3ff0
commit 402949d787
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -1143,24 +1143,22 @@ impl TabInner {
dpi: dims.dpi,
};
if size != current_size {
// Update the split nodes with adjusted sizes
adjust_x_size(
self.pane.as_mut().unwrap(),
cols as isize - current_size.cols as isize,
&dims,
);
adjust_y_size(
self.pane.as_mut().unwrap(),
rows as isize - current_size.rows as isize,
&dims,
);
// Update the split nodes with adjusted sizes
adjust_x_size(
self.pane.as_mut().unwrap(),
cols as isize - current_size.cols as isize,
&dims,
);
adjust_y_size(
self.pane.as_mut().unwrap(),
rows as isize - current_size.rows as isize,
&dims,
);
self.size = size;
self.size = size;
// And then resize the individual panes to match
apply_sizes_from_splits(self.pane.as_mut().unwrap(), &size);
}
// And then resize the individual panes to match
apply_sizes_from_splits(self.pane.as_mut().unwrap(), &size);
}
}