Also resize pty

This commit is contained in:
Thomas Forgione 2023-11-06 23:05:32 +01:00
parent 20757a093b
commit b7a5d83faa
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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);