mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
config: parse 'none' as empty modifiers value
This commit is contained in:
parent
300acda813
commit
46cadee80f
1 changed files with 5 additions and 0 deletions
5
config.c
5
config.c
|
|
@ -1485,6 +1485,11 @@ parse_modifiers(struct context *ctx, const char *text, size_t len,
|
|||
bool ret = false;
|
||||
|
||||
*modifiers = (struct config_key_modifiers){0};
|
||||
|
||||
/* Handle "none" separately because e.g. none+shift is nonsense */
|
||||
if (strncmp(text, "none", len) == 0)
|
||||
return true;
|
||||
|
||||
char *copy = xstrndup(text, len);
|
||||
|
||||
for (char *tok_ctx = NULL, *key = strtok_r(copy, "+", &tok_ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue