aboutsummaryrefslogtreecommitdiffstats
path: root/src/grid.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-05 10:59:13 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-05 10:59:13 -0500
commite12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c (patch)
treece1f8a8eb3dc4c1ab20947e1a2a5a76606fc68cf /src/grid.rs
parentb7359e5513e6102c293d51f0fbdabfccc3fe6450 (diff)
downloadvt100-rust-e12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c.tar.gz
vt100-rust-e12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c.zip
stop wrapping if the number of cols changes
Diffstat (limited to 'src/grid.rs')
-rw-r--r--src/grid.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs
index 50942f4..d7abbad 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -45,6 +45,12 @@ impl Grid {
}
pub fn set_size(&mut self, size: Size) {
+ if size.cols != self.size.cols {
+ for row in &mut self.rows {
+ row.wrap(false);
+ }
+ }
+
self.size = size;
if self.scroll_bottom >= size.rows {