summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-03-25 11:44:17 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-03-25 11:44:17 +0000
commit9af715eeb055d5e2ad925ec36594520bf38ec2d8 (patch)
tree692266467c35e2546a66c59be17290040b4d934d /usr.bin/tmux/tty-keys.c
parent102efa6a47dbba8b95fe3baf85ce9759f08d93fd (diff)
Process ^[ as meta when a partial key is found.
Diffstat (limited to 'usr.bin/tmux/tty-keys.c')
-rw-r--r--usr.bin/tmux/tty-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index aab045c4ea8..c31402d7d43 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.57 2013/03/25 11:36:25 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.58 2013/03/25 11:44:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -498,6 +498,7 @@ tty_keys_next(struct tty *tty)
goto complete_key;
}
+first_key:
/* Is this a meta key? */
if (len >= 2 && buf[0] == '\033') {
if (buf[1] != '\033') {
@@ -518,7 +519,6 @@ tty_keys_next(struct tty *tty)
}
}
-first_key:
/* No key found, take first. */
key = (u_char) *buf;
size = 1;