summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/grid/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/grid/mod.rs')
-rw-r--r--alacritty_terminal/src/grid/mod.rs2
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);