summaryrefslogtreecommitdiffstats
path: root/cmd-unbind-key.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-08-16 09:37:48 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-08-16 09:37:48 +0000
commit2fc84c7c34f599f913109c94f85eb682138a64ec (patch)
treedd451d93dd0b7b8c1113476a4fd65d949ddb1423 /cmd-unbind-key.c
parent6b734d10746ac86a13b05ad48b79e92ca8ccc96b (diff)
Use key_bindings_remove for unbind-key -a to allow it to work from key
bindings. From "miaout17" SF bug 3392063.
Diffstat (limited to 'cmd-unbind-key.c')
-rw-r--r--cmd-unbind-key.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-unbind-key.c b/cmd-unbind-key.c
index 8eb829d4..7e8c183c 100644
--- a/cmd-unbind-key.c
+++ b/cmd-unbind-key.c
@@ -59,9 +59,7 @@ cmd_unbind_key_exec(struct cmd *self, unused struct cmd_ctx *ctx)
if (args_has(args, 'a')) {
while (!SPLAY_EMPTY(&key_bindings)) {
bd = SPLAY_ROOT(&key_bindings);
- SPLAY_REMOVE(key_bindings, &key_bindings, bd);
- cmd_list_free(bd->cmdlist);
- xfree(bd);
+ key_bindings_remove(bd->key);
}
return (0);
}