diff options
author | a5ob7r <12132068+a5ob7r@users.noreply.github.com> | 2021-12-03 16:45:05 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 07:45:05 +0000 |
commit | 7e736c00f68ca133ca3380c1ddd78ba61ced1f8e (patch) | |
tree | 20742613e38284289a6f15fe9df2d2bbc5d98f63 /alacritty_terminal/src/grid | |
parent | 4c6a763850a5dec0fa34d15e356dcba19875690a (diff) | |
download | alacritty-7e736c00f68ca133ca3380c1ddd78ba61ced1f8e.tar.gz alacritty-7e736c00f68ca133ca3380c1ddd78ba61ced1f8e.zip |
Fix crash when vi cursor in history during clear
Fixes #5544.
Diffstat (limited to 'alacritty_terminal/src/grid')
-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 df83d7e3..230dc5b5 100644 --- a/alacritty_terminal/src/grid/mod.rs +++ b/alacritty_terminal/src/grid/mod.rs @@ -376,6 +376,9 @@ impl<T> Grid<T> { pub fn clear_history(&mut self) { // Explicitly purge all lines from history. self.raw.shrink_lines(self.history_size()); + + // Reset display offset. + self.display_offset = 0; } /// This is used only for initializing after loading ref-tests. |