From de52ddb6c25a6d58cdfaa095ad6ec9abffa6564a Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 2 Mar 2019 21:30:29 +0000 Subject: Fix alt screen bugs This fixes two bugs with the alternate screen buffer. When resetting while in the alt screen, Alacritty would not swap out the grids leading to scrollback getting disabled. By swapping out the grids again when resetting in the alternate screen buffer, scrollback is now unaffected from a reset. There was another issue with the cursor jumping around when leaving the alt screen even though it was not active, this was fixed by skipping all alt screen swap routines unless the current state matches the expected state. This fixes #2145. --- src/grid/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/grid/storage.rs') diff --git a/src/grid/storage.rs b/src/grid/storage.rs index 19c1636d..87a129d0 100644 --- a/src/grid/storage.rs +++ b/src/grid/storage.rs @@ -160,7 +160,7 @@ impl Storage { } // Shrink the number of lines in the buffer - fn shrink_lines(&mut self, shrinkage: usize) { + pub fn shrink_lines(&mut self, shrinkage: usize) { self.len -= shrinkage; // Free memory -- cgit