-
Notifications
You must be signed in to change notification settings - Fork 245
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 attempt to subtract with overflow (#582) #586
Conversation
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.
LGTM, thanks for digging into this! Will leave this open for other reviews, feel free to ping me in a week or so.
Sorry, I failed to fix a comment. To whomever keeps approving the workflows: thank you. 🙏 |
We gotchu :) |
@chris-laplante do you want to do a final review before (squash and) merge? @smoelius thanks for your work in getting this right, and @oli-obk thanks for the reviews! |
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.
Looks good to me! Thanks for the new tests too :)
Fixes #582
The test
orphan_lines
reproduces the panic. The testorphan_lines_message_above_progress_bar
tries to ensure that messages are still printed correctly following the fix.The proposed fix is to effectively ignore
self.orphan_lines_count
many lines fromreal_len
when comparingreal_len
to the terminal height.@oli-obk Would you be able to glance at this? 🙏