tui: fix occasional UI flicker (#2918)
occasionally i was seeing some minor flickering when adding history lines. hopefully this clears it up.
This commit is contained in:
@@ -252,10 +252,10 @@ impl Tui {
|
|||||||
if next_deadline.is_none_or(|cur| at < cur) {
|
if next_deadline.is_none_or(|cur| at < cur) {
|
||||||
next_deadline = Some(at);
|
next_deadline = Some(at);
|
||||||
}
|
}
|
||||||
if at <= Instant::now() {
|
// Do not send a draw immediately here. By continuing the loop,
|
||||||
next_deadline = None;
|
// we recompute the sleep target so the draw fires once via the
|
||||||
let _ = draw_tx_clone.send(());
|
// sleep branch, coalescing multiple requests into a single draw.
|
||||||
}
|
continue;
|
||||||
}
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user