Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
term: Use \r for spinner
Browse files Browse the repository at this point in the history
The save/restore cursor escape sequences from `termion` do not work on
macOS.
  • Loading branch information
cloudhead committed Oct 11, 2023
1 parent 499738d commit 7c842bc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions radicle-term/src/spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ pub fn spinner_to(

write!(
animation,
"{}{}{spinner} {message}",
termion::cursor::Save,
"{}{spinner} {message}\r",
termion::clear::AfterCursor,
)
.ok();

write!(animation, "{}", termion::cursor::Restore).ok();

*cursor += 1;
*cursor %= DEFAULT_STYLE.len();
}
Expand Down

0 comments on commit 7c842bc

Please sign in to comment.