aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/term.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/term.rs b/src/term.rs
index b25502f1..c254f6b9 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -158,6 +158,10 @@ impl Term {
self.cursor.x = 0;
}
+ if self.cursor.y == self.grid.num_rows() as u16 {
+ panic!("cursor fell off grid");
+ }
+
let cell = &mut self.grid[self.cursor];
cell.c = c;
cell.fg = self.fg;