diff --git a/examples/demo3.sh b/examples/demo3.sh index 286d470..b1a9384 100755 --- a/examples/demo3.sh +++ b/examples/demo3.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash -width=$(stty size | cut -d ' ' -f 2) - for c in a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9; do -for i in `seq 1 $width`; do +for i in `seq 1 $(stty size | cut -d ' ' -f 2)`; do echo -n $c done +sleep 2s done diff --git a/src/tile.rs b/src/tile.rs index 3a77160..9dc3366 100644 --- a/src/tile.rs +++ b/src/tile.rs @@ -658,6 +658,11 @@ impl Tile { self.outer_size = (w, h); self.inner_size = (w - 4, h - 5); + if let Some(pty) = self.pty.as_mut() { + pty.resize(pty_process::Size::new(self.inner_size.1, self.inner_size.0)) + .unwrap(); + } + let old_stdout = std::mem::replace(&mut self.stdout, vec![String::new()]); for s in old_stdout { self.push_stdout(s);