aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-01 17:28:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-01 18:08:39 +0000
commit4801e39eaeced401c2f7ee9a8af1df4417848b32 (patch)
tree0a8e752f37b721b3ec0e3cc6b01e359e632cf26e /config.c
parentrender: always damage two cells when rendering the cursor (diff)
conf: make number of scrollback lines configurable
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/config.c b/config.c
index 5ed2308b..2e41b98e 100644
--- a/config.c
+++ b/config.c
@@ -162,6 +162,15 @@ parse_section_main(const char *key, const char *value, struct config *conf,
conf->render_worker_count = count;
}
+ else if (strcmp(key, "scrollback") == 0) {
+ unsigned long lines;
+ if (!str_to_ulong(value, 10, &lines)) {
+ LOG_ERR("%s:%d: expected an integer: %s", path, lineno, value);
+ return false;
+ }
+ conf->scrollback_lines = lines;
+ }
+
else {
LOG_WARN("%s:%u: invalid key: %s", path, lineno, key);
return false;
@@ -407,6 +416,7 @@ config_load(struct config *conf)
.term = strdup("foot"),
.shell = get_shell(),
.fonts = tll_init(),
+ .scrollback_lines = 1000,
.colors = {
.fg = default_foreground,