aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/grid
diff options
context:
space:
mode:
authora5ob7r <12132068+a5ob7r@users.noreply.github.com>2021-12-19 00:36:56 +0900
committerGitHub <noreply@github.com>2021-12-18 15:36:56 +0000
commitcded85a2f2c1c554d64bae285ccd8f9815468d4d (patch)
tree758612432075bd9d4fc260fc3e70ad106a6957fb /alacritty_terminal/src/grid
parent8e58409930354c71c102ba7b86d1732b6c053642 (diff)
downloadalacritty-cded85a2f2c1c554d64bae285ccd8f9815468d4d.tar.gz
alacritty-cded85a2f2c1c554d64bae285ccd8f9815468d4d.zip
Keep history position when viewport is cleared
This patch resolves a behavior that display area doesn't keep track of content in a scrollback buffer due to display offset reset when viewport clear is invoked. This is similar to #5341, but this problem is caused by viewport clear instead of new outputs to the viewport.
Diffstat (limited to 'alacritty_terminal/src/grid')
-rw-r--r--alacritty_terminal/src/grid/mod.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs
index 230dc5b5..8b94ac41 100644
--- a/alacritty_terminal/src/grid/mod.rs
+++ b/alacritty_terminal/src/grid/mod.rs
@@ -313,9 +313,6 @@ impl<T: GridCell + Default + PartialEq + Clone> Grid<T> {
let positions = (iter.point.line.0 + 1) as usize;
let region = Line(0)..Line(self.lines as i32);
- // Reset display offset.
- self.display_offset = 0;
-
// Clear the viewport.
self.scroll_up(&region, positions);