The \033[K escape sequence signifies 'clear from cursor position to the
end of the line'. Without moving the cursor to the beggining of the line
first it results in no text being deleted. The behaviour of Carriage
Return (\r) in terminal emulators is not formally standardized but it is
generally interpreted as a move to the beginning of the line.
Tested on both Linux and Windows (cmd.exe, WSL2 and Windows Terminal).
The \033[K escape sequence signifies 'clear from cursor position to the end of the line'. Without moving the cursor to the beggining of the line first it results in no text being deleted. The behaviour of Carriage Return (\r) in terminal emulators is not formally standardized but it is generally interpreted as a move to the beginning of the line.
Tested on both Linux and Windows (cmd.exe, WSL2 and Windows Terminal).
Fixes https://github.com/briandowns/spinner/issues/123