=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.43 retrieving revision 1.44 diff -c -r1.43 -r1.44 *** src/usr.bin/tmux/tty-keys.c 2012/08/21 10:08:11 1.43 --- src/usr.bin/tmux/tty-keys.c 2012/09/03 06:26:48 1.44 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.43 2012/08/21 10:08:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.44 2012/09/03 06:26:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 533,538 **** --- 533,539 ---- * timer has expired, give up waiting and send the escape. */ if ((tty->flags & TTY_ESCAPE) && + evtimer_initialized(&tty->key_timer) && !evtimer_pending(&tty->key_timer, NULL)) { evbuffer_drain(tty->event->input, 1); key = '\033'; *************** *** 543,549 **** start_timer: /* If already waiting for timer, do nothing. */ ! if (evtimer_pending(&tty->key_timer, NULL)) return (0); /* Start the timer and wait for expiry or more data. */ --- 544,551 ---- start_timer: /* If already waiting for timer, do nothing. */ ! if (evtimer_initialized(&tty->key_timer) && ! evtimer_pending(&tty->key_timer, NULL)) return (0); /* Start the timer and wait for expiry or more data. */