diff --git a/CHANGELOG.md b/CHANGELOG.md index a8bd9a2..a7e6ddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Performance bottleneck when clearing colored rows - Vague startup crash messages on Windows with WinPTY backend - Deadlock on Windows when closing Alacritty using the title bar "X" button (ConPTY backend) +- Crash on `clear` when scrolled up in history ## 0.4.0 diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs index ad9d9b7..a12c950 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -544,6 +544,9 @@ impl Grid { 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);