Fix full redraws always using stdout

This commit is contained in:
Joscha 2023-05-10 19:25:46 +02:00
parent f005ec10fe
commit 3b9ffe8715

View file

@ -199,7 +199,7 @@ impl Terminal {
/// be empty again and have no cursor position. /// be empty again and have no cursor position.
pub fn present(&mut self) -> io::Result<()> { pub fn present(&mut self) -> io::Result<()> {
if self.full_redraw { if self.full_redraw {
io::stdout().queue(Clear(ClearType::All))?; self.out.queue(Clear(ClearType::All))?;
self.prev_frame_buffer.reset(); // Because the screen is now empty self.prev_frame_buffer.reset(); // Because the screen is now empty
self.full_redraw = false; self.full_redraw = false;
} }