diff options
author | 2011-08-16 09:37:48 +0000 | |
---|---|---|
committer | 2011-08-16 09:37:48 +0000 | |
commit | b7e7d9630ace7e75573f9be9f38bfd3f7e53fd07 (patch) | |
tree | 2f4f16e014925121df30e0782d5fb82b8d2ba1f5 | |
parent | Correctly skip existing numbers when generating the name for a new (diff) | |
download | wireguard-openbsd-b7e7d9630ace7e75573f9be9f38bfd3f7e53fd07.tar.xz wireguard-openbsd-b7e7d9630ace7e75573f9be9f38bfd3f7e53fd07.zip |
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.c | 6 |
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); } |