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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix attempt to subtract with overflow (#582) #586

Merged
merged 5 commits into from Sep 20, 2023
Merged

Fix attempt to subtract with overflow (#582) #586

merged 5 commits into from Sep 20, 2023

Conversation

smoelius
Copy link
Contributor

@smoelius smoelius commented Sep 8, 2023

Fixes #582

The test orphan_lines reproduces the panic. The test orphan_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 from real_len when comparing real_len to the terminal height.

@oli-obk Would you be able to glance at this? 馃檹

Copy link
Collaborator

@djc djc left a 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.

@smoelius
Copy link
Contributor Author

Sorry, I failed to fix a comment.

To whomever keeps approving the workflows: thank you. 馃檹

@chris-laplante
Copy link
Collaborator

To whomever keeps approving the workflows: thank you. 馃檹

We gotchu :)

@djc
Copy link
Collaborator

djc commented Sep 19, 2023

@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!

Copy link
Collaborator

@chris-laplante chris-laplante left a 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 :)

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.

Attempt to subtract with overflow when output exceeds terminal height
4 participants