summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-08-16 09:37:49 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-08-16 09:37:49 +0000
commit4652a0c122893f854d55c4e891fcd11597554111 (patch)
treef34442049229b02ae8de0537790b0aa622857a6f
parent95691d9f53fb0cc630982c470e31999f7ccff698 (diff)
Use key_bindings_remove for unbind-key -a to allow it to work from key
bindings. From "miaout17" SF bug 3392063.
-rw-r--r--usr.bin/tmux/cmd-unbind-key.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c
index cddf26b47ea..82b1034c035 100644
--- a/usr.bin/tmux/cmd-unbind-key.c
+++ b/usr.bin/tmux/cmd-unbind-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-unbind-key.c,v 1.10 2011/01/10 21:28:47 nicm Exp $ */
+/* $OpenBSD: cmd-unbind-key.c,v 1.11 2011/08/16 09:37:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);
}