Skip to content

Commit

Permalink
Match LF behavior outside scroll region with urxvt
Browse files Browse the repository at this point in the history
Outside of a scroll region, linefeed will still advances the line until
reaching the bottom row in other terminals. Alacritty now matches that.
  • Loading branch information
jwilm committed Nov 11, 2017
1 parent d52e545 commit 7e8db8d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/term/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 7e8db8d

Please sign in to comment.