fix(compatibility): fix grid glitch edge-case when resizing (#149)

* fix(compatibility): fix grid glitch edge-case when resizing a grid with a scroll region

* style(fmt): rustfmt
This commit is contained in:
Aram Drevekenin 2021-01-20 17:01:13 +01:00 committed by GitHub
parent e7ea05f50b
commit 81af57b15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -636,7 +636,8 @@ impl Grid {
// region // region
for _ in 0..count { for _ in 0..count {
self.viewport.remove(current_line_index); self.viewport.remove(current_line_index);
self.viewport.insert(scroll_region_bottom, Row::new()); self.viewport
.insert(scroll_region_bottom, Row::new().canonical());
} }
} }
} }
@ -652,7 +653,8 @@ impl Grid {
// of the scroll region // of the scroll region
for _ in 0..count { for _ in 0..count {
self.viewport.remove(scroll_region_bottom); self.viewport.remove(scroll_region_bottom);
self.viewport.insert(current_line_index, Row::new()); self.viewport
.insert(current_line_index, Row::new().canonical());
} }
} }
} }