I am observing attempt to subtract with overflow on this line:
|
*last_line_count = real_len - self.orphan_lines_count + shift; |
self.lines.len() >= self.orphan_lines_count holds prior to entering this loop:
|
for (idx, line) in self.lines.iter().enumerate() { |
And real_len >= idx holds at the start of each iteration of that loop.
Those two facts causes me to squint at this if block:
|
if real_len + diff > term_height { |
|
break; |
|
} |
In particular, commenting out that if block causes my panics to go away.
I don't completely understand the purpose of that if block, but maybe it can go away?
(indicatif is a great tool, BTW.)
I am observing
attempt to subtract with overflowon this line:indicatif/src/draw_target.rs
Line 534 in 40b40d2
self.lines.len() >= self.orphan_lines_countholds prior to entering this loop:indicatif/src/draw_target.rs
Line 501 in 40b40d2
And
real_len >= idxholds at the start of each iteration of that loop.Those two facts causes me to squint at this
ifblock:indicatif/src/draw_target.rs
Lines 517 to 519 in 40b40d2
In particular, commenting out that
ifblock causes my panics to go away.I don't completely understand the purpose of that
ifblock, but maybe it can go away?(indicatif is a great tool, BTW.)