[BACK]Return to tty-keys.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty-keys.c between version 1.38 and 1.39

version 1.38, 2012/03/21 21:28:03 version 1.39, 2012/04/22 05:21:40
Line 476 
Line 476 
                 goto partial_key;                  goto partial_key;
         }          }
   
   
         /* Is this a mouse key press? */          /* Is this a mouse key press? */
         switch (tty_keys_mouse(tty, buf, len, &size, &mouse)) {          switch (tty_keys_mouse(tty, buf, len, &size, &mouse)) {
         case 0:         /* yes */          case 0:         /* yes */
Line 532 
Line 531 
   
 partial_key:  partial_key:
         /*          /*
          * Escape but no key string. If have already seen an escape, then the           * Escape but no key string. If have already seen an escape and the
          * timer must have expired, so give up waiting and send the escape.           * timer has expired, give up waiting and send the escape.
          */           */
         if (tty->flags & TTY_ESCAPE) {          if ((tty->flags & TTY_ESCAPE) &&
               !evtimer_pending(&tty->key_timer, NULL)) {
                 evbuffer_drain(tty->event->input, 1);                  evbuffer_drain(tty->event->input, 1);
                 key = '\033';                  key = '\033';
                 goto handle_key;                  goto handle_key;
Line 544 
Line 544 
         /* Fall through to start the timer. */          /* Fall through to start the timer. */
   
 start_timer:  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. */          /* Start the timer and wait for expiry or more data. */
         delay = options_get_number(&global_options, "escape-time");          delay = options_get_number(&global_options, "escape-time");
         tv.tv_sec = delay / 1000;          tv.tv_sec = delay / 1000;

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39