bombshell-dev / clack

Effortlessly build beautiful command-line apps
https://clack.cc
5.25k stars 88 forks source link

[Bug] Spinner message is repeated infinitely if terminal window width is smaller than message width #132

Open Lms24 opened 11 months ago

Lms24 commented 11 months ago

Environment

Describe the bug When the terminal in which a clack Spinner is run is smaller than the line length of the spinner.start() message, it is printed repeatedly to the terminal instead.

To Reproduce Minimal reproduction: https://stackblitz.com/edit/node-xdzhbp?file=index.js

Steps to reproduce the behavior:

==> message is repeated infinitely

Expected behavior

The spinner message is not repeated infinitely but the original one is updated instead.

Additional Information

Our current workaround is to just print very short messages but ofc it'd be better to fix this properly.

Please let me know how we can help fixing this bug.

Example: image