Use flag to determine when terminal needs update, only update once before draw

This commit is contained in:
Jeremy Soller 2024-01-04 14:25:31 -07:00
parent bb0d11180d
commit 556c32e33f
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 22 additions and 4 deletions

View file

@ -666,7 +666,7 @@ impl Application for App {
TermEvent::MouseCursorDirty | TermEvent::Wakeup => {
if let Some(terminal) = self.tab_model.data::<Mutex<Terminal>>(entity) {
let mut terminal = terminal.lock().unwrap();
terminal.update();
terminal.needs_update = true;
}
}
_ => {