aboutsummaryrefslogtreecommitdiff
path: root/src/grid/storage.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2019-03-02 15:49:52 +0100
committerChristian Duerr <contact@christianduerr.com>2019-03-02 21:36:52 +0100
commitb7ed0855bf11d06e5ce27ac124b0d62d878acb69 (patch)
treeee40404604fa757f62844cab715eb14b6cbfc134 /src/grid/storage.rs
parent9468b50b75be13d6b0d36ba2c01d36d92f008bf2 (diff)
downloadalacritty-b7ed0855bf11d06e5ce27ac124b0d62d878acb69.tar.gz
alacritty-b7ed0855bf11d06e5ce27ac124b0d62d878acb69.zip
Fix alt screen bugsissue-2145
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.
Diffstat (limited to 'src/grid/storage.rs')
-rw-r--r--src/grid/storage.rs2
1 files changed, 1 insertions, 1 deletions
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<T> Storage<T> {
}
// 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