diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-02-12 23:24:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 20:24:24 +0000 |
commit | 7ecf93ec7061869713ebaa07384ad7a935c4a4d5 (patch) | |
tree | c78c55ec4b7280e2834d95bcdac6d66952463064 | |
parent | bfd69d01782fd05481066f293560b1211e9f41c6 (diff) | |
download | alacritty-7ecf93ec7061869713ebaa07384ad7a935c4a4d5.tar.gz alacritty-7ecf93ec7061869713ebaa07384ad7a935c4a4d5.zip |
Fix incorrect display offset after rotation
Regression was introduced in 4cc6421daa4ff5976ab43c67110a7a80a36541e5,
however it was working before only due to grid.len() bug.
-rw-r--r-- | alacritty_terminal/src/grid/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index d1ccd320..febdff69 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -523,7 +523,7 @@ impl<T: GridCell + PartialEq + Copy> Grid<T> { if region.start == Line(0) { // Update display offset when not pinned to active area if self.display_offset != 0 { - self.display_offset = min(self.display_offset + *positions, self.len() - num_lines); + self.display_offset = min(self.display_offset + *positions, self.max_scroll_limit); } self.increase_scroll_limit(*positions, template); |