aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/term.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/term.rs b/src/term.rs
index 691c5392..d31cf9ab 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -405,7 +405,11 @@ impl ansi::Handler for Term {
debug_print!("{}", c);
if self.cursor.col == self.grid.num_cols() {
debug_println!("wrapping");
- self.cursor.line += 1;
+ if (self.cursor.line + 1) == self.grid.num_lines() {
+ self.linefeed();
+ } else {
+ self.cursor.line += 1;
+ }
self.cursor.col = Column(0);
}