diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-09-08 08:45:28 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-09-08 08:45:28 +0000 |
commit | 3875b0766b9acf7850990f139b5f98b3c3b0a742 (patch) | |
tree | 1aae193d577bc72fc2f26507f35f6d11f7f5f8ac /usr.bin/tmux/key-bindings.c | |
parent | 2ba1268ab5b259227e11df1e247113bebd6135fd (diff) |
When removing a key table clear it out of clients, fixes issue with
unbind -a reported by Thomas Sattler.
Diffstat (limited to 'usr.bin/tmux/key-bindings.c')
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index e29e2a20b80..a75b17fafc9 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.81 2017/06/09 14:00:46 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.82 2017/09/08 08:45:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -138,12 +138,17 @@ void key_bindings_remove_table(const char *name) { struct key_table *table; + struct client *c; table = key_bindings_get_table(name, 0); if (table != NULL) { RB_REMOVE(key_tables, &key_tables, table); key_bindings_unref_table(table); } + TAILQ_FOREACH(c, &clients, entry) { + if (c->keytable == table) + server_client_set_key_table(c, NULL); + } } void |