summaryrefslogtreecommitdiffstats
path: root/cmd-list-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-12-27 13:41:50 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-12-27 13:41:50 +0000
commitd71e4b9aca9c2c07832b9f12f63360a4b84a973a (patch)
tree08ab2119950c74faa44016b06bf3e233fe721de5 /cmd-list-keys.c
parentda145e7c2068e1729a7e3c2c191c504fc416ca57 (diff)
Reset flags on every loop or it is displayed too often, from Chris
Johnsen.
Diffstat (limited to 'cmd-list-keys.c')
-rw-r--r--cmd-list-keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c
index 6e359e5b..73ecf458 100644
--- a/cmd-list-keys.c
+++ b/cmd-list-keys.c
@@ -54,7 +54,6 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
return (cmd_list_keys_table(self, ctx));
width = 0;
- *flags = '\0';
SPLAY_FOREACH(bd, key_bindings, &key_bindings) {
key = key_string_lookup_key(bd->key & ~KEYC_PREFIX);
@@ -78,6 +77,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
if (key == NULL)
continue;
+ *flags = '\0';
if (!(bd->key & KEYC_PREFIX)) {
if (bd->can_repeat)
xsnprintf(flags, sizeof flags, "-rn ");