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

Fix line updates #35

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Fix line updates #35

merged 2 commits into from
Aug 26, 2022

Conversation

chelnak
Copy link
Owner

@chelnak chelnak commented Aug 26, 2022

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.

@chelnak chelnak added the bug Something isn't working label Aug 26, 2022
@chelnak chelnak self-assigned this Aug 26, 2022
Prior to this commit, 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 shorted 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.
This commit adds a new example that shows how ysmrr could be used in a
more complex application.
@chelnak chelnak merged commit 3a53eab into main Aug 26, 2022
@chelnak chelnak deleted the fix_line_updates branch August 26, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant