aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/term.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term.rs b/src/term.rs
index d31cf9ab..48ae151d 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -405,7 +405,7 @@ impl ansi::Handler for Term {
debug_print!("{}", c);
if self.cursor.col == self.grid.num_cols() {
debug_println!("wrapping");
- if (self.cursor.line + 1) == self.grid.num_lines() {
+ if (self.cursor.line + 1) >= self.scroll_region.end {
self.linefeed();
} else {
self.cursor.line += 1;