aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2018-07-06 07:45:10 -0700
committerJoe Wilm <joe@jwilm.com>2018-07-06 07:45:10 -0700
commite1895a16ff796ecb0ff443ac689be6455212ae51 (patch)
treed933916dae0e570bac6335b7411c0c9a406c57ff
parentcde1d8d1edb0c8001a28a2a674c46b5a581439db (diff)
downloadalacritty-scroll/fix-alt-grid-size.tar.gz
alacritty-scroll/fix-alt-grid-size.zip
Disable scroll buffer for "alt" Gridscroll/fix-alt-grid-size
The scroll history size for the alternative grid (used by fullscreen apps such as vim and tmux) is now forced to zero. There are two motivations for this change: 1. According to the literature, the alt screen should not have scroll history. 2. Reduce memory consumption by only allocating the single scroll history. In the future, it may be desirable to support a configuration option to enable a scroll buffer for the alt screen. By launching without this feature, we can delay a decision about whether to officially support this or not.
-rw-r--r--src/term/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 67d34be1..9f8506d1 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -849,13 +849,13 @@ impl Term {
let history_size = config.scrolling().history as usize;
let grid = Grid::new(num_lines, num_cols, history_size, Cell::default());
+ let alt = Grid::new(num_lines, num_cols, 0 /* scroll history */, Cell::default());
let tabspaces = config.tabspaces();
let tabs = IndexRange::from(Column(0)..grid.num_cols())
.map(|i| (*i as usize) % tabspaces == 0)
.collect::<Vec<bool>>();
- let alt = grid.clone();
let scroll_region = Line(0)..grid.num_lines();
Term {