=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- src/usr.bin/tmux/tty-keys.c 2009/11/26 22:26:51 1.24 +++ src/usr.bin/tmux/tty-keys.c 2009/11/30 16:44:03 1.25 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-keys.c,v 1.24 2009/11/26 22:26:51 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.25 2009/11/30 16:44:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -472,12 +472,15 @@ goto partial_key; } - /* Not found. Try to parse a key with an xterm-style modifier. */ - key = xterm_keys_find(buf, len, &size); - if (key != KEYC_NONE) { + switch (xterm_keys_find(buf, len, &size, &key)) { + case 0: /* found */ evbuffer_drain(tty->event->input, size); goto handle_key; + case -1: /* not found */ + break; + case 1: + goto partial_key; } /* Skip the escape. */