If you drag the bottom of the cmd.exe window to the top repeatedly, sometimes the following code panics with the message "attempt to add with overflow".
// pretend this is run on every event::read()
//
let stdout = std::io::stdout();
let (width, height) = term::size()?; // height == 65535 when the cmd.exe window is height 0 sometimes
for _ in 0..height - 2 {
term::queue!(
stdout,
term::MoveToColumn(0),
term::Print('║'),
term::MoveToColumn(left_pane_width - 1),
term::Print('║'),
term::MoveToNextLine(1)
)?;
}
If you drag the bottom of the cmd.exe window to the top repeatedly, sometimes the following code panics with the message "attempt to add with overflow".
I'm not sure if this is expected behaviour.