mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
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.
This commit is contained in:
parent
471237d2ce
commit
87468b5c00
4 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[1m[7m%[27m[1m[0m
]2;jwilm@jwilm-desk: ~/code/alacritty]1;..ode/alacritty
[0m[27m[24m[Jjwilm@jwilm-desk [01;32m➜ [01;32m [36m~/code/alacritty [00m [K[?1h=[?2004h
|
||||
bck-i-search: _[K[A[23Cclear; [4mc[24mat ~/Downloads/xtest.txt; sleep 100[1B[67Dc_[A[29C[4mc[4ma[24m[1B[32Da_[A[28C[1C[4ma[4mt[24m[1B[32Dt_[A[27C[35mc[35ml[35me[35ma[35mr[39m[2C[24m[35mc[24m[35ma[24m[35mt[39m [36m~[36m/[36mD[36mo[36mw[36mn[36ml[36mo[36ma[36md[36ms[36m/[36mx[36mt[36me[36ms[36mt[36m.[36mt[36mx[36mt[39m[2C[35ms[35ml[35me[35me[35mp[39m[1B
[K[A[45C[?1l>[?2004l[1B
]2;clear; cat ~/Downloads/xtest.txt; sleep 100]1;clear;[3;J[H[2J[2;21r
|
||||
[20;1H 58 getprogname()); [21;1H 59 exit [22;52H9[2C 9
|
||||
[21;1H 59 !!!!
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
{"width":587.0,"height":360.0,"cell_width":7.0,"cell_height":16.0,"padding_x":3.0,"padding_y":3.0}
|
Loading…
Reference in a new issue