aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty_terminal/src/grid/mod.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a8bd9a2d..a7e6ddb7 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 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(&region, positions, template);