diff --git a/src/lib.rs b/src/lib.rs index cc36ee6..5ce2035 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,7 +155,6 @@ impl Spinner { /// pub fn stop(mut self) { self.stop_spinner_thread(); - // print message println!("{}", self.msg); } @@ -176,7 +175,6 @@ impl Spinner { /// pub fn stop_with_message(mut self, msg: StringLiteral) { self.stop_spinner_thread(); - // put the message over the spinner println!("{}", msg); } @@ -316,6 +314,7 @@ impl Spinner { .store(false, std::sync::atomic::Ordering::Relaxed); // Wait for the thread to actually stop + // Also deletes the last line of the terminal after stopped self.thread_handle .take() .expect("Stopping the spinner thread should only happen once.") diff --git a/src/printer.rs b/src/printer.rs index 87234fc..c6faefe 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -4,7 +4,6 @@ use yansi::Paint; pub fn delete_last_line(clear_length: usize) { let mut stdout_lock = stdout().lock(); - write!(stdout_lock, "\r").unwrap(); for _ in 0..clear_length { write!(stdout_lock, " ").unwrap();