config: add 'uppercase-regex-insert'

This makes the "uppercase hint character inserts selected text"
behavior added in #1975 configurable, as it can have unexpected
behavior for some users.

It defaults to "on", preserving the new behavior of `foot`, after

Fixes #2159.
This commit is contained in:
Ryan Roden-Corrent 2025-08-07 08:18:38 -04:00 committed by Daniel Eklöf
parent f0e36e35cb
commit 298196365c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 24 additions and 1 deletions

View file

@ -1119,6 +1119,9 @@ parse_section_main(struct context *ctx)
(int *)&conf->initial_color_theme);
}
else if (streq(key, "uppercase-regex-insert"))
return value_to_bool(ctx, &conf->uppercase_regex_insert);
else {
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
return false;
@ -3383,6 +3386,7 @@ config_load(struct config *conf, const char *conf_path,
.strikeout_thickness = {.pt = 0., .px = -1},
.dpi_aware = false,
.gamma_correct = false,
.uppercase_regex_insert = true,
.security = {
.osc52 = OSC52_ENABLED,
},