mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
config: add scrollback.multiplier option
This option is used to multiply the mouse scroll amount for mouse and trackpad based scrollback scrolling. Closes #54.
This commit is contained in:
parent
93b03c91ed
commit
36468b0406
5 changed files with 22 additions and 2 deletions
12
config.c
12
config.c
|
|
@ -439,6 +439,17 @@ parse_section_scrollback(const char *key, const char *value, struct config *conf
|
|||
}
|
||||
}
|
||||
|
||||
else if (strcmp(key, "multiplier") == 0) {
|
||||
double multiplier;
|
||||
if (!str_to_double(value, &multiplier)) {
|
||||
LOG_AND_NOTIFY_ERR("%s:%d: [scrollback]: multiplier: "
|
||||
"invalid value: %s", path, lineno, value);
|
||||
return false;
|
||||
}
|
||||
|
||||
conf->scrollback.multiplier = multiplier;
|
||||
}
|
||||
|
||||
else {
|
||||
LOG_AND_NOTIFY_ERR("%s:%u: [scrollback]: %s: invalid key", path, lineno, key);
|
||||
return false;
|
||||
|
|
@ -1218,6 +1229,7 @@ config_load(struct config *conf, const char *conf_path, bool errors_are_fatal)
|
|||
.format = SCROLLBACK_INDICATOR_FORMAT_TEXT,
|
||||
.text = wcsdup(L""),
|
||||
},
|
||||
.multiplier = 1.,
|
||||
},
|
||||
.colors = {
|
||||
.fg = default_foreground,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue