From 1fe4edf44963bd4a412bff04eb3e99c273a4e6ec Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Fri, 19 Aug 2016 18:06:33 -0700 Subject: Fix bug in input In applications with a scroll region, newlines were not being properly added because the scroll region was ignored. --- src/term.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit