Carriage return does not work nicely after line wrapping.
Given a long string of text, currently the carriage return (CR) reset the cursor to the start on the same line, not to the start of the first line (and do some cleaning). Use bash for examples:
|$ echo $'aaaaa|
|aaaaaaaaa\rx' |
|xaaaaaaaaaaaaa|<-output
|$ echo $'aaaaa|
|aaaaaaaaaa\rx'|
|aaaaaaaaaaaaaa|<-output
|x |
If a program (mostly tests) use CRs to show a progress bar, but does not truncate the long lines, it may flush the screen with a lot of wrapped lines.
Edited by J.W