aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/term/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index e4c64fa5..633aa904 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -1086,6 +1086,8 @@ impl ansi::Handler for Term {
};
self.cursor = *holder;
+ self.cursor.point.line = min(self.cursor.point.line, self.grid.num_lines() - 1);
+ self.cursor.point.col = min(self.cursor.point.col, self.grid.num_cols() - 1);
}
#[inline]