diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-21 19:48:03 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-06-21 19:48:03 +0100 |
commit | f8481f93c5fc92f5503a2bdd94c60375a2c81bb5 (patch) | |
tree | e8cd0d3a0cfc16a5d602a9143d301b818953ec68 /key-bindings.c | |
parent | cddf50b715be8732ffd0732d33a886b788a231c5 (diff) | |
parent | 0c5ed177c4e5178127dc8fe3528985df8ff988a6 (diff) | |
download | rtmux-f8481f93c5fc92f5503a2bdd94c60375a2c81bb5.tar.gz rtmux-f8481f93c5fc92f5503a2bdd94c60375a2c81bb5.tar.bz2 rtmux-f8481f93c5fc92f5503a2bdd94c60375a2c81bb5.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/key-bindings.c b/key-bindings.c index f725508b..58be0c6f 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -27,7 +27,6 @@ RB_GENERATE(key_bindings, key_binding, entry, key_bindings_cmp); struct key_bindings key_bindings; -struct key_bindings dead_key_bindings; int key_bindings_cmp(struct key_binding *bd1, struct key_binding *bd2) @@ -78,20 +77,8 @@ key_bindings_remove(int key) if ((bd = key_bindings_lookup(key)) == NULL) return; RB_REMOVE(key_bindings, &key_bindings, bd); - RB_INSERT(key_bindings, &dead_key_bindings, bd); -} - -void -key_bindings_clean(void) -{ - struct key_binding *bd; - - while (!RB_EMPTY(&dead_key_bindings)) { - bd = RB_ROOT(&dead_key_bindings); - RB_REMOVE(key_bindings, &dead_key_bindings, bd); - cmd_list_free(bd->cmdlist); - free(bd); - } + cmd_list_free(bd->cmdlist); + free(bd); } void |