diff options
author | Kirill Chibisov <wchibisovkirill@gmail.com> | 2019-12-22 14:05:19 +0300 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2019-12-22 11:05:19 +0000 |
commit | 44037fa42aa80002ce54f0a8e4a6203e3e12aaf5 (patch) | |
tree | 8bb3d2aa248224c4f1fe29334750a421ee193473 /alacritty_terminal | |
parent | 85112fefa56cfc125df46b171f154ad44e4e6c3a (diff) |
Fix crash on clear when scrolled up in history
Fixes #3112.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r-- | alacritty_terminal/src/grid/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index ad9d9b7b..a12c9509 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -544,6 +544,9 @@ impl<T: GridCell + PartialEq + Copy> Grid<T> { let positions = self.lines - iter.cur.line; let region = Line(0)..self.num_lines(); + // Reset display offset + self.display_offset = 0; + // Clear the viewport self.scroll_up(®ion, positions, template); |