Don't measure widths while presenting

This commit is contained in:
Joscha 2023-02-17 18:59:25 +01:00
parent fae12a4b9f
commit ba6ee45110
5 changed files with 56 additions and 49 deletions

View file

@ -22,7 +22,11 @@ fn widget() -> impl Widget<io::Error> {
}
fn render_frame(term: &mut Terminal) {
while term.present_widget(widget()).unwrap() {}
let mut dirty = true;
while dirty {
dirty = term.measure_widths().unwrap();
term.present_widget(widget()).unwrap();
}
}
fn main() {