Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle wrapping, add hideCursor option #69

Merged
merged 6 commits into from Feb 21, 2018
Merged

Handle wrapping, add hideCursor option #69

merged 6 commits into from Feb 21, 2018

Conversation

novemberborn
Copy link
Contributor

Count how many rows are taken up by the spinner and the text and clear the appropriate number of lines. Fix clear() so it doesn't clear further lines until render() is called again.

Fixes #38. Fixes #7.

Add hideCursor option. Fixes #27. Users may still hide the cursor outside of Ora.

There aren't any tests for hiding the cursor so I didn't add one for not hiding it either.


I did a quick test in the Windows command prompt and the wrap handling seemed to work fine.

Count how many rows are taken up by the spinner and the text and clear
the appropriate number of lines. Fix clear() so it doesn't clear
*further* lines until render() is called again.

Fixes #38. Fixes #7.
Fixes #27. Users may still hide the cursor outside of Ora.
@novemberborn novemberborn mentioned this pull request Feb 20, 2018
@novemberborn
Copy link
Contributor Author

FYI I'm integrating this with AVA just to make sure it all works as expected. No need to merge just yet.

@novemberborn
Copy link
Contributor Author

OK this seems to work well now. @sindresorhus et al please let me know if anything needs changing.

@sindresorhus sindresorhus merged commit 4df5d19 into sindresorhus:master Feb 21, 2018
@sindresorhus
Copy link
Owner

This looks good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants