=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.402 retrieving revision 1.403 diff -c -r1.402 -r1.403 *** src/usr.bin/tmux/server-client.c 2023/09/02 20:03:10 1.402 --- src/usr.bin/tmux/server-client.c 2023/12/27 20:23:59 1.403 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.402 2023/09/02 20:03:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.403 2023/12/27 20:23:59 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 1867,1873 **** struct key_binding *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_UNATTACHEDFLAGS)) --- 1867,1873 ---- struct key_binding *bd; int xtimeout, flags; struct cmd_find_state fs; ! key_code key0, prefix, prefix2; /* Check the client is good to accept input. */ if (s == NULL || (c->flags & CLIENT_UNATTACHEDFLAGS)) *************** *** 1939,1947 **** * The prefix always takes precedence and forces a switch to the prefix * table, unless we are already there. */ key0 = (key & (KEYC_MASK_KEY|KEYC_MASK_MODIFIERS)); ! 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); --- 1939,1949 ---- * The prefix always takes precedence and forces a switch to the prefix * table, unless we are already there. */ + prefix = (key_code)options_get_number(s->options, "prefix"); + prefix2 = (key_code)options_get_number(s->options, "prefix2"); key0 = (key & (KEYC_MASK_KEY|KEYC_MASK_MODIFIERS)); ! if ((key0 == (prefix & (KEYC_MASK_KEY|KEYC_MASK_MODIFIERS)) || ! key0 == (prefix2 & (KEYC_MASK_KEY|KEYC_MASK_MODIFIERS))) && strcmp(table->name, "prefix") != 0) { server_client_set_key_table(c, "prefix"); server_status_client(c);