diff options
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index eb7f0f72..58f4b815 100644 --- a/src/config.rs +++ b/src/config.rs @@ -396,6 +396,14 @@ pub struct Config { /// Number of spaces in one tab #[serde(default="default_tabspaces", deserialize_with = "deserialize_tabspaces")] tabspaces: usize, + + /// How much scrolling history to keep + #[serde(default="default_scroll_history")] + scroll_history: u32, +} + +fn default_scroll_history() -> u32 { + 10_000 } fn failure_default_vec<'a, D, T>(deserializer: D) -> ::std::result::Result<Vec<T>, D::Error> @@ -1244,6 +1252,10 @@ impl Config { .map(|path| path.into()) } + pub fn scroll_history(&self) -> usize { + self.scroll_history as _ + } + pub fn write_defaults() -> io::Result<Cow<'static, Path>> { let path = ::xdg::BaseDirectories::with_prefix("alacritty") .map_err(|err| io::Error::new(io::ErrorKind::NotFound, ::std::error::Error::description(&err))) |