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 612 #613

Merged
merged 5 commits into from Dec 23, 2023
Merged

Fix 612 #613

merged 5 commits into from Dec 23, 2023

Conversation

smoelius
Copy link
Contributor

@smoelius smoelius commented Dec 14, 2023

Fixes #612

Note that I have to eat my words. This PR does not use the approach that @djc suggested:

I don't have a strong preference so open to arguments that I'm wrong, but I feel like a "line" being a horizontal stripe across the window (that is, counting multiple for wrapped lines) is probably the more intuitive concept?

I tried to do that, but I ran into trouble here:

orphaned.extend(self.state.lines.drain(..self.state.orphan_lines_count));

That is, DrawStateWrapper's drop handler uses state.orphan_lines_count as a number of state.lines entries, and I couldn't see a good way around that. So I adapted the other parts of the code to use the same approach.

This PR currently has five commits. I think they should make sense indiviudally.

The `orphan_lines_message_above_progress_bar` tests now pass. But the
`multi_progress_println_terminal_wrap` test fails.
The `multi_progress_println_terminal_wrap` test now passes.
@chris-laplante chris-laplante merged commit 9b533cc into console-rs:main Dec 23, 2023
10 checks passed
@smoelius smoelius deleted the fix-612 branch December 23, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants