summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-03-07 20:24:21 +0000
committernicm <nicm@openbsd.org>2019-03-07 20:24:21 +0000
commit30a94f4585db9f50fb6a1c23caadbbef26c4afb1 (patch)
tree5acdc4f9378c915db3f7695fec401a063aec6e0a /usr.bin/tmux/server-client.c
parentTidy changing the mode into window_copy_init_for_output. (diff)
downloadwireguard-openbsd-30a94f4585db9f50fb6a1c23caadbbef26c4afb1.tar.xz
wireguard-openbsd-30a94f4585db9f50fb6a1c23caadbbef26c4afb1.zip
Add a separate mode struct for the active window mode if any.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r--usr.bin/tmux/server-client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index 66a7b9ec279..4bce307a4a3 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.265 2019/02/16 11:42:08 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.266 2019/03/07 20:24:21 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -928,6 +928,7 @@ server_client_handle_key(struct client *c, key_code key)
struct window_pane *wp;
struct timeval tv;
struct key_table *table, *first;
+ const char *tablename;
struct key_binding *bd;
int xtimeout, flags;
struct cmd_find_state fs;
@@ -1009,8 +1010,10 @@ server_client_handle_key(struct client *c, key_code key)
if (server_client_is_default_key_table(c, c->keytable) &&
wp != NULL &&
wp->mode != NULL &&
- wp->mode->key_table != NULL)
- table = key_bindings_get_table(wp->mode->key_table(wp), 1);
+ wp->mode->mode->key_table != NULL) {
+ tablename = wp->mode->mode->key_table(wp->mode);
+ table = key_bindings_get_table(tablename, 1);
+ }
else
table = c->keytable;
first = table;