diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2021-04-08 22:29:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 20:29:47 +0000 |
commit | 78953e4f7e89d0e90b8e1981bf76b03df16eded3 (patch) | |
tree | 744e2de6a74aa12b9e532021382c583abce4fb08 | |
parent | cbcc12944006603131119b73c2ad72ebccf4562d (diff) | |
download | alacritty-78953e4f7e89d0e90b8e1981bf76b03df16eded3.tar.gz alacritty-78953e4f7e89d0e90b8e1981bf76b03df16eded3.zip |
Fix automatic scrolling on resize
-rw-r--r-- | alacritty_terminal/src/grid/resize.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty_terminal/src/grid/resize.rs b/alacritty_terminal/src/grid/resize.rs index 10bc51f9..882c0c90 100644 --- a/alacritty_terminal/src/grid/resize.rs +++ b/alacritty_terminal/src/grid/resize.rs @@ -187,7 +187,7 @@ impl<T: GridCell + Default + PartialEq + Clone> Grid<T> { cursor_line_delta += line_delta.0 as usize; } else if row.is_clear() { - if i <= self.display_offset { + if i < self.display_offset { // Since we removed a line, rotate down the viewport. self.display_offset = self.display_offset.saturating_sub(1); } @@ -355,7 +355,7 @@ impl<T: GridCell + Default + PartialEq + Clone> Grid<T> { } row = Row::from_vec(wrapped, occ); - if i <= self.display_offset { + if i < self.display_offset { // Since we added a new line, rotate up the viewport. self.display_offset += 1; } |