diff options
| author | feeptr@codeberg.org <feeptr> | 2021-11-29 21:45:00 +0000 |
|---|---|---|
| committer | feeptr@codeberg.org <feeptr> | 2021-12-02 23:47:07 +0000 |
| commit | 46cadee80f596ce9c50e6b4e191471a4186dce1c (patch) | |
| tree | 73cff2412aa7fa3e86951cd973fb43eb3d15e3f8 /config.c | |
| parent | changelog: list new mouse.selection-override-modifiers option (diff) | |
config: parse 'none' as empty modifiers value
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |
