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:
parent
d52e545db3
commit
7e8db8db1a
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue