diff --git a/src/main.rs b/src/main.rs index 404b715..7d1260b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ fn main() -> Result<(), Box> { if use_alternate_screen { execute!(stdout, EnterAlternateScreen)?; } - let backend = CrosstermBackend::new(stdout); + let backend = CrosstermBackend::new(std::io::stderr()); let mut terminal = Terminal::new(backend)?; eprintln!("terminal created"); @@ -34,8 +34,9 @@ fn main() -> Result<(), Box> { loop { let blink = (blink_counter / 3) % 2 == 0; + println!("UI rendering"); terminal.draw(|f| ui::draw(f, &app, blink))?; - std::io::stdout().flush()?; + std::io::stderr().flush()?; eprintln!("draw done"); blink_counter += 1; let timeout = if app.show_welcome {