diff --git a/src/main.rs b/src/main.rs index 323e924..e78649c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,6 +33,7 @@ use anyhow::{bail, Context}; use clap::ArgMatches; use image::FlatSamples; use std::borrow::Borrow; +use std::io::{self, Write}; use std::sync::{mpsc, Arc, Mutex}; use std::time::{Duration, Instant}; use std::{env, thread}; @@ -108,6 +109,7 @@ fn main() -> Result<()> { let interact = thread::spawn(move || -> Result<()> { sub_shell_thread(&program).map(|_| ()) }); clear_screen(); + io::stdout().flush().unwrap(); if args.get_flag("verbose") { println!( "Frame cache dir: {:?}", @@ -119,9 +121,7 @@ fn main() -> Result<()> { println!("Recording window id: {}", win_id); } } - if args.get_flag("quiet") { - println!(); - } else { + if !args.get_flag("quiet") { println!("[t-rec]: Press Ctrl+D to end recording"); } thread::sleep(Duration::from_millis(1250));