=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.238 retrieving revision 1.239 diff -c -r1.238 -r1.239 *** src/usr.bin/tmux/server-client.c 2017/06/06 15:49:35 1.238 --- src/usr.bin/tmux/server-client.c 2017/06/13 07:12:33 1.239 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.238 2017/06/06 15:49:35 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.239 2017/06/13 07:12:33 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 818,823 **** --- 818,824 ---- struct key_binding bd_find, *bd; int xtimeout, flags; struct cmd_find_state fs; + key_code key0; /* Check the client is good to accept input. */ if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0) *************** *** 906,913 **** * The prefix always takes precedence and forces a switch to the prefix * table, unless we are already there. */ ! if ((key == (key_code)options_get_number(s->options, "prefix") || ! key == (key_code)options_get_number(s->options, "prefix2")) && strcmp(table->name, "prefix") != 0) { server_client_set_key_table(c, "prefix"); server_status_client(c); --- 907,915 ---- * The prefix always takes precedence and forces a switch to the prefix * table, unless we are already there. */ ! key0 = (key & ~KEYC_XTERM); ! if ((key0 == (key_code)options_get_number(s->options, "prefix") || ! key0 == (key_code)options_get_number(s->options, "prefix2")) && strcmp(table->name, "prefix") != 0) { server_client_set_key_table(c, "prefix"); server_status_client(c); *************** *** 925,931 **** log_debug("currently repeating"); /* Try to see if there is a key binding in the current table. */ ! bd_find.key = (key & ~KEYC_XTERM); bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find); if (bd != NULL) { /* --- 927,933 ---- log_debug("currently repeating"); /* Try to see if there is a key binding in the current table. */ ! bd_find.key = key0; bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find); if (bd != NULL) { /*