term: Use `\r` for spinner
The save/restore cursor escape sequences from `termion` do not work on macOS.
This commit is contained in:
parent
499738de71
commit
7c842bcc1d
|
|
@ -137,14 +137,11 @@ pub fn spinner_to(
|
||||||
|
|
||||||
write!(
|
write!(
|
||||||
animation,
|
animation,
|
||||||
"{}{}{spinner} {message}",
|
"{}{spinner} {message}\r",
|
||||||
termion::cursor::Save,
|
|
||||||
termion::clear::AfterCursor,
|
termion::clear::AfterCursor,
|
||||||
)
|
)
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
write!(animation, "{}", termion::cursor::Restore).ok();
|
|
||||||
|
|
||||||
*cursor += 1;
|
*cursor += 1;
|
||||||
*cursor %= DEFAULT_STYLE.len();
|
*cursor %= DEFAULT_STYLE.len();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue