aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2018-04-14 17:21:48 +0200
committerJoe Wilm <joe@jwilm.com>2018-06-02 09:56:50 -0700
commit2234234ca9a2ab0d7eccd46893cbe6799b051aba (patch)
tree369d5a5b9855b7f3c08d5f8a3836ed9c47203ce5 /src/config.rs
parentd8bda60c3d8f906f1018012f4a55c7b894afb4b7 (diff)
downloadalacritty-2234234ca9a2ab0d7eccd46893cbe6799b051aba.tar.gz
alacritty-2234234ca9a2ab0d7eccd46893cbe6799b051aba.zip
Enable history comparison in ref-tests
Previously ref-tests just ignored the scrollback history to keep the old tests working, this would lead to new tests which rely on scrollback history to succeeed even though they should not. This has been fixed and it is now possible to create ref-tests with and without scrollback history. When available the scrollback history is compared, but the old tests still work without having to adjust them. This fixes #1244.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 0eab1bfb..b9c943ee 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1431,6 +1431,11 @@ impl Config {
self.scrolling
}
+ // Update the history size, used in ref tests
+ pub fn set_history(&mut self, history: u32) {
+ self.scrolling.history = history;
+ }
+
pub fn load_from<P: Into<PathBuf>>(path: P) -> Result<Config> {
let path = path.into();
let raw = Config::read_file(path.as_path())?;