aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grid.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grid.rs b/src/grid.rs
index 839ac2f..246e9e6 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -472,7 +472,7 @@ impl Grid {
let size = self.size;
let pos = self.pos;
let row = self.current_row_mut();
- for col in pos.col..((pos.col + count).min(size.cols)) {
+ for col in pos.col..((pos.col.saturating_add(count)).min(size.cols)) {
row.erase(col as usize, attrs);
}
}