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?
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.
Fixes #612
Note that I have to eat my words. This PR does not use the approach that @djc suggested:
I tried to do that, but I ran into trouble here: https://github.com/console-rs/indicatif/blob/8941d5e8f55fe32a629a80872ee20971c00ee53d/src/draw_target.rs#L390
That is,
DrawStateWrapper
's drop handler usesstate.orphan_lines_count
as a number ofstate.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.