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

Diff for /src/usr.bin/tmux/input.c between version 1.37 and 1.38

version 1.37, 2011/03/07 23:46:27 version 1.38, 2011/05/20 19:03:58
Line 1445 
Line 1445 
 void  void
 input_exit_osc(struct input_ctx *ictx)  input_exit_osc(struct input_ctx *ictx)
 {  {
           u_char *p = ictx->input_buf;
           int     option;
   
         if (ictx->flags & INPUT_DISCARD)          if (ictx->flags & INPUT_DISCARD)
                 return;                  return;
         log_debug("%s: \"%s\"", __func__, ictx->input_buf);          if (ictx->input_len < 1 || *p < '0' || *p > '9')
   
         if (ictx->input_len < 2 || ictx->input_buf[1] != ';')  
                 return;                  return;
         if (ictx->input_buf[0] != '0' && ictx->input_buf[0] != '2')  
                 return;  
   
         screen_set_title(ictx->ctx.s, ictx->input_buf + 2);          log_debug("%s: \"%s\"", __func__, p);
         server_status_window(ictx->wp->window);  
           option = 0;
           while (*p >= '0' && *p <= '9')
                   option = option * 10 + *p++ - '0';
           if (*p == ';')
                   p++;
   
           switch (option) {
           case 0:
           case 2:
                   screen_set_title(ictx->ctx.s, p);
                   server_status_window(ictx->wp->window);
                   break;
           case 12:
                   screen_set_cursor_colour(ictx->ctx.s, p);
                   break;
           case 112:
                   if (*p == '\0') /* No arguments allowed. */
                           screen_set_cursor_colour(ictx->ctx.s, "");
                   break;
           default:
                   log_debug("%s: unknown '%u'", __func__, option);
                   break;
           }
 }  }
   
 /* APC string started. */  /* APC string started. */

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