-
Notifications
You must be signed in to change notification settings - Fork 276
Attempt to subtract with overflow when output exceeds terminal height #582
Copy link
Copy link
Closed
Description
I am observing attempt to subtract with overflow on this line:
Line 534 in 40b40d2
| *last_line_count = real_len - self.orphan_lines_count + shift; |
self.lines.len() >= self.orphan_lines_count holds prior to entering this loop:
Line 501 in 40b40d2
| 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:
Lines 517 to 519 in 40b40d2
| 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.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels