mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
when erasing the display ensure line size matches physical
In the case where the screen was enlarged, we don't eagerly resize the line vectors. If a subsequent erase display occurred, we'd only erase to the old size of the lines, rather than the new size, which could result in a black square in the upper right corner of the display. Repro scenario is: * resize window larger than initial height * `dialog --yesno hello 0 0` The dialog background should fill the display.
This commit is contained in:
parent
cbc1462bb4
commit
49467515d6
@ -130,8 +130,10 @@ impl Screen {
|
|||||||
cols: impl Iterator<Item = usize>,
|
cols: impl Iterator<Item = usize>,
|
||||||
attr: &CellAttributes,
|
attr: &CellAttributes,
|
||||||
) {
|
) {
|
||||||
|
let physical_cols = self.physical_cols;
|
||||||
let line_idx = self.phys_row(y);
|
let line_idx = self.phys_row(y);
|
||||||
let line = self.line_mut(line_idx);
|
let line = self.line_mut(line_idx);
|
||||||
|
line.resize(physical_cols);
|
||||||
line.fill_range(cols, &Cell::new(' ', attr.clone()));
|
line.fill_range(cols, &Cell::new(' ', attr.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user