Match LF behavior outside scroll region with urxvt

Outside of a scroll region, linefeed will still advances the line until
reaching the bottom row in other terminals. Alacritty now matches that.
This commit is contained in:
Joe Wilm authored and Joe Wilm committed 2017-11-11 09:23:43 -08:00
1 parent d52e545db3
commit 7e8db8db1a
1 file changed
+4 -5
+4 -5
View File
@@ -1449,12 +1449,11 @@ impl ansi::Handler for Term {
#[inline]
fn linefeed(&mut self) {
trace!("linefeed");
if (self.cursor.point.line + 1) == self.scroll_region.end {
let next = self.cursor.point.line + 1;
if next == self.scroll_region.end {
self.scroll_up(Line(1));
} else {
if (self.cursor.point.line + 1) < self.scroll_region.end {
self.cursor.point.line += 1;
}
} else if next < self.grid.num_lines() {
self.cursor.point.line += 1;
}
}