nathanpeck / clui

Command Line UI toolkit for Node.js
MIT License
1.66k stars 40 forks source link

Spinner didn't clear previous message if it is too long #6

Closed cheahkhing closed 7 years ago

cheahkhing commented 9 years ago

Hi, thanks for your great clui module, i like it a lot. :+1:

Anyway, here's one issue i found when i tried the spinner.

If you update the message using spinner.message('some very very long message'); then spinner.message('short message'), you will see that your output will get tangled up. Because the short message is printed over the old message, i think it should clear the line before spitting out the new message.

**BTW, your documentationi says spinner.update(), but there's no such method, i see the code then I notice it's spinner.message().

Acanguven commented 9 years ago

You guys have a very dirty documentation, but your module is awesome.

luiseduardobrito commented 7 years ago

One year, still no response?

artokun commented 7 years ago

I'll first update the readme and take a look at clearing the line on update. Confirmed bug.

artokun commented 7 years ago

Ref: https://github.com/nathanpeck/clui/pull/7

artokun commented 7 years ago

Merged in