Skip to content

Commit

Permalink
fix: When used with --quiet, don't print a blank line on startup. (#…
Browse files Browse the repository at this point in the history
…210)

* When used with `--quiet`, don't print a blank line on startup.
* Fix empty if.

---------

Co-authored-by: Erik Corry <[email protected]>
Co-authored-by: Sven Kanoldt <[email protected]>
  • Loading branch information
3 people authored Jan 11, 2025
1 parent 1da917e commit 6ba2b71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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: {:?}",
Expand All @@ -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));
Expand Down

0 comments on commit 6ba2b71

Please sign in to comment.