Avoid asking for terminal size on each rendering

This commit is contained in:
mo8it
2024-09-05 17:45:27 +02:00
parent bcc2a136c8
commit 9faa5d3aa4
3 changed files with 27 additions and 11 deletions
+2 -2
View File
@@ -43,8 +43,8 @@ pub fn terminal_event_handler(tx: Sender<WatchEvent>, manual_run: bool) {
return;
}
}
Event::Resize(_, _) => {
if tx.send(WatchEvent::TerminalResize).is_err() {
Event::Resize(width, _) => {
if tx.send(WatchEvent::TerminalResize { width }).is_err() {
return;
}
}