summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
diff options
context:
space:
mode:
authornicm <nicm>2015-12-12 18:19:00 +0000
committernicm <nicm>2015-12-12 18:19:00 +0000
commit39cf9c9d31954198ad73e2b6721a92fe782ee56c (patch)
tree8b2a0238d0d1ccf01232a2f45560dd5b0c9259fe /cmd-set-option.c
parent88bc8f3528b973adb17f541e21aa415923a10f1e (diff)
Allow prefix and prefix2 to be set to None to disable (useful if you
would rather bind the prefix in the root table).
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 7de91aa2..e2a4768c 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -396,7 +396,8 @@ cmd_set_option_key(__unused struct cmd *self, struct cmd_q *cmdq,
{
key_code key;
- if ((key = key_string_lookup_string(value)) == KEYC_NONE) {
+ key = key_string_lookup_string(value);
+ if (key == KEYC_UNKNOWN) {
cmdq_error(cmdq, "bad key: %s", value);
return (NULL);
}