make scrollback size configurable

This commit is contained in:
Wez Furlong committed 2018-02-10 09:43:54 -08:00
1 parent beeaacfabc
commit 6af3b63d57
3 files changed
+11 -1

No files matched your search

+2
View File
@@ -77,6 +77,8 @@ I use the following in my `~/.wezterm.toml`:
```
font_size = 10
font = { fontconfig_pattern = "Operator Mono SSm Lig Medium" }
# How many lines of scrollback to retain
scrollback_lines = 3500
[[font_rules]]
italic = true
+4
View File
@@ -31,6 +31,9 @@ pub struct Config {
/// The color palette
pub colors: Option<Palette>,
/// How many lines of scrollback you want to retain
pub scrollback_lines: Option<usize>,
}
fn default_font_size() -> f64 {
@@ -49,6 +52,7 @@ impl Default for Config {
font: TextStyle::default(),
font_rules: Vec::new(),
colors: None,
scrollback_lines: None,
}
}
}
+5 -1
View File
@@ -119,7 +119,11 @@ fn run() -> Result<(), Error> {
PollOpt::edge(),
)?;
let terminal = term::Terminal::new(initial_rows as usize, initial_cols as usize, 3000);
let terminal = term::Terminal::new(
initial_rows as usize,
initial_cols as usize,
config.scrollback_lines.unwrap_or(3500),
);
// let message = "; ❤ 😍🤢\n\x1b[91;mw00t\n\x1b[37;104;m bleet\x1b[0;m.";
// terminal.advance_bytes(message);
// !=