diff options
author | 2015-10-20 14:19:27 +0000 | |
---|---|---|
committer | 2015-10-20 14:19:27 +0000 | |
commit | fd15420f37cc4856411b868a7a2b6802b9aebee8 (patch) | |
tree | 185a04acb4aa25761206e6e1a3e452741b988196 /usr.bin/tmux/server-client.c | |
parent | After pledge "dns" has been refactored and setsockopt(SO_RCVBUF) (diff) | |
download | wireguard-openbsd-fd15420f37cc4856411b868a7a2b6802b9aebee8.tar.xz wireguard-openbsd-fd15420f37cc4856411b868a7a2b6802b9aebee8.zip |
The table could change when retrying so don't save it at start of
server_client_handle_key.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index fdf0d378776..db7bca13575 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.155 2015/10/18 20:42:43 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.156 2015/10/20 14:19:27 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -541,7 +541,7 @@ server_client_handle_key(struct client *c, int key) struct window *w; struct window_pane *wp; struct timeval tv; - struct key_table *table = c->keytable; + struct key_table *table; struct key_binding bd_find, *bd; int xtimeout; @@ -607,7 +607,7 @@ server_client_handle_key(struct client *c, int key) retry: /* Try to see if there is a key binding in the current table. */ bd_find.key = key; - bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find); + bd = RB_FIND(key_bindings, &c->keytable->key_bindings, &bd_find); if (bd != NULL) { /* * Key was matched in this table. If currently repeating but a @@ -625,6 +625,7 @@ retry: * Take a reference to this table to make sure the key binding * doesn't disappear. */ + table = c->keytable; table->references++; /* |