aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2014-02-17 18:09:25 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2014-02-17 18:09:25 +0000
commitd325104d10b699e8c85cddd7ee9b7d2273c8cf40 (patch)
treeed3512ff09e388cb3f91c82ea5bad6a13d745a09 /tty-keys.c
parent3aadc9d665fd3ec52181c5e1d8bd2d6481a97fef (diff)
parentb3de4a3dec85bc84bb83da6b46e2a8e2a634ace3 (diff)
downloadrtmux-d325104d10b699e8c85cddd7ee9b7d2273c8cf40.tar.gz
rtmux-d325104d10b699e8c85cddd7ee9b7d2273c8cf40.tar.bz2
rtmux-d325104d10b699e8c85cddd7ee9b7d2273c8cf40.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 595ad6e1..7fb91a84 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -479,6 +479,15 @@ tty_keys_next(struct tty *tty)
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 */
@@ -489,15 +498,6 @@ tty_keys_next(struct tty *tty)
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:
/* Is this a meta key? */
if (len >= 2 && buf[0] == '\033') {