From 46cadee80f596ce9c50e6b4e191471a4186dce1c Mon Sep 17 00:00:00 2001 From: "feeptr@codeberg.org" Date: Mon, 29 Nov 2021 21:45:00 +0000 Subject: [PATCH] config: parse 'none' as empty modifiers value --- config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.c b/config.c index 5dd59384..d4eac3ac 100644 --- a/config.c +++ b/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);