1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05:00

Fix crash on clear when scrolled up in history

Fixes #3112.
This commit is contained in:
Kirill Chibisov 2019-12-22 14:05:19 +03:00 committed by Christian Duerr
parent 85112fefa5
commit 44037fa42a
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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);