=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.61 retrieving revision 1.62 diff -c -r1.61 -r1.62 *** src/usr.bin/tmux/tty-keys.c 2013/10/10 11:57:52 1.61 --- src/usr.bin/tmux/tty-keys.c 2014/02/10 11:20:41 1.62 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.61 2013/10/10 11:57:52 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.62 2014/02/10 11:20:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 479,484 **** --- 479,493 ---- goto partial_key; } + /* Look for matching key string and return if found. */ + tk = tty_keys_find(tty, buf, len, &size); + if (tk != NULL) { + if (tk->next != NULL) + goto partial_key; + key = tk->key; + goto complete_key; + } + /* Try to parse a key with an xterm-style modifier. */ switch (xterm_keys_find(buf, len, &size, &key)) { case 0: /* found */ *************** *** 487,501 **** break; case 1: goto partial_key; - } - - /* Look for matching key string and return if found. */ - tk = tty_keys_find(tty, buf, len, &size); - if (tk != NULL) { - if (tk->next != NULL) - goto partial_key; - key = tk->key; - goto complete_key; } first_key: --- 496,501 ----