Skip to content

Fix 612#613

Merged
chris-laplante merged 5 commits intoconsole-rs:mainfrom
smoelius:fix-612
Dec 23, 2023
Merged

Fix 612#613
chris-laplante merged 5 commits intoconsole-rs:mainfrom
smoelius:fix-612

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

Development

Successfully merging this pull request may close these issues.

indicatif crashes with assertion failed: self.orphan_lines_count <= self.lines.len() if number of terminal columns is less than 135

2 participants