-
-
Notifications
You must be signed in to change notification settings - Fork 28
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 cursor hiding in threaded run #50
base: master
Are you sure you want to change the base?
Conversation
a02199f
to
2aa1e62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Orgad 👋
Nice spot with the issue! Thank you for submitting this PR. There are a few things to resolve before this can be considered for merging. We need an additional test in the auto_spin_spec.rb
on top of what's already there that specifically raises inside the thread.
2aa1e62
to
550e197
Compare
a5fd890
to
7aeda4d
Compare
lib/tty/spinner.rb
Outdated
spin | ||
sleep(sleep_time) | ||
end | ||
rescue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
auto_spin ensure was called right after starting to spin, so the cursor was never actually hidden. Fix by calling the initial spin in the thread, and wrap the thread with rescue that shows the cursor at the end.
7aeda4d
to
aaa5ff6
Compare
Describe the change
Fix cursor hiding in threaded run.
Why are we doing this?
auto_spin ensure was called right after starting to spin, so the cursor was never actually hidden.
Benefits
See above.
Drawbacks
Requirements
master
branch?