chelnak / ysmrr

YSMRR is a package that provides simple multi-line compatible spinners for Go applications.
MIT License
71 stars 6 forks source link

Fix line updates #35

Closed chelnak closed 1 year ago

chelnak commented 1 year ago

Prior to this PR, lines were not properly cleared. This meant that updating the message of a spinner could result in text being incorrectly displayed. This would have been more noticeable when the updated message was shorter than the original message.

This commit fixes that by adding a new ClearLine method to the tput package and using it to ensure that each line is cleared before it is rendered.