diff options
author | Joe Wilm <jwilm@users.noreply.github.com> | 2017-08-22 11:24:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 11:24:33 -0700 |
commit | 87468b5c00858684ab0a17f9e1821aa374f74924 (patch) | |
tree | 733d0d887fd5fcd1ffd26c935de6499b03717bc4 /src | |
parent | 471237d2ced1d1a07de06d832b2902efbc237df9 (diff) | |
download | alacritty-87468b5c00858684ab0a17f9e1821aa374f74924.tar.gz alacritty-87468b5c00858684ab0a17f9e1821aa374f74924.zip |
Fix newline + scroll region bug (#747)
When a scroll region is active with the cursor below the bottom of the
region, newlines should not cause the region to scroll.
A ref test was added for this situation to prevent regressions.
Thanks @hiciu for reporting and @nicm for the test case.
Resolves #745.
Diffstat (limited to 'src')
-rw-r--r-- | src/term/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs index 37d444ba..a068f553 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -1405,7 +1405,7 @@ impl ansi::Handler for Term { #[inline] fn linefeed(&mut self) { trace!("linefeed"); - if (self.cursor.point.line + 1) >= self.scroll_region.end { + if (self.cursor.point.line + 1) == self.scroll_region.end { self.scroll_up(Line(1)); } else { self.cursor.point.line += 1; |