fix(grid): out of bounds removal when app does not update its scroll region on resize (#4045)
This commit is contained in:
parent
2fe960a16d
commit
1a8c3d7c94
1 changed files with 3 additions and 1 deletions
|
|
@ -1283,7 +1283,9 @@ impl Grid {
|
|||
let mut pad_character = EMPTY_TERMINAL_CHARACTER;
|
||||
pad_character.styles = self.cursor.pending_styles.clone();
|
||||
for _ in 0..count {
|
||||
if scroll_region_top < self.viewport.len() {
|
||||
self.viewport.remove(scroll_region_top);
|
||||
}
|
||||
let columns = VecDeque::from(vec![pad_character.clone(); self.width]);
|
||||
self.viewport
|
||||
.insert(scroll_region_bottom, Row::from_columns(columns).canonical());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue