From 55f2016683e22686412ce3923023e63ed7bf20b1 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 8 Dec 2019 17:49:27 -0800 Subject: [PATCH] fix subtraction underflow --- src/frontend/gui/termwindow.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/gui/termwindow.rs b/src/frontend/gui/termwindow.rs index 8b71b0920..93e6281d4 100644 --- a/src/frontend/gui/termwindow.rs +++ b/src/frontend/gui/termwindow.rs @@ -1672,7 +1672,9 @@ impl TermWindow { self.render_metrics.cell_size.height * line_idx as isize, ), Size::new( - (self.dimensions.pixel_width - pixel_width_of_cells) as isize, + self.dimensions + .pixel_width + .saturating_sub(pixel_width_of_cells) as isize, self.render_metrics.cell_size.height, ), ),