mirror of
https://github.com/alacritty/alacritty.git
synced 2025-07-31 22:03:40 -04: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:
parent
d52e545db3
commit
7e8db8db1a
1 changed files with 4 additions and 5 deletions
|
@ -1449,12 +1449,11 @@ impl ansi::Handler for Term {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn linefeed(&mut self) {
|
fn linefeed(&mut self) {
|
||||||
trace!("linefeed");
|
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));
|
self.scroll_up(Line(1));
|
||||||
} else {
|
} else if next < self.grid.num_lines() {
|
||||||
if (self.cursor.point.line + 1) < self.scroll_region.end {
|
self.cursor.point.line += 1;
|
||||||
self.cursor.point.line += 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue