1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

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 2017-11-11 08:45:17 -08:00 committed by Joe Wilm
parent d52e545db3
commit 7e8db8db1a

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;
}
}