[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.159 and 1.160

version 1.159, 2019/08/05 06:42:02 version 1.160, 2019/09/24 20:44:58
Line 888 
Line 888 
 {  {
         struct input_ctx                *ictx = wp->ictx;          struct input_ctx                *ictx = wp->ictx;
         struct screen_write_ctx         *sctx = &ictx->ctx;          struct screen_write_ctx         *sctx = &ictx->ctx;
         const struct input_transition   *itr;          const struct input_state        *state = NULL;
           const struct input_transition   *itr = NULL;
         size_t                           off = 0;          size_t                           off = 0;
   
         if (len == 0)          if (len == 0)
Line 916 
Line 917 
                 ictx->ch = buf[off++];                  ictx->ch = buf[off++];
   
                 /* Find the transition. */                  /* Find the transition. */
                 itr = ictx->state->transitions;                  if (ictx->state != state ||
                 while (itr->first != -1 && itr->last != -1) {                      itr == NULL ||
                         if (ictx->ch >= itr->first && ictx->ch <= itr->last)                      ictx->ch < itr->first ||
                                 break;                      ictx->ch > itr->last) {
                         itr++;                          itr = ictx->state->transitions;
                           while (itr->first != -1 && itr->last != -1) {
                                   if (ictx->ch >= itr->first && ictx->ch <= itr->last)
                                           break;
                                   itr++;
                           }
                           if (itr->first == -1 || itr->last == -1) {
                                   /* No transition? Eh? */
                                   fatalx("no transition from state");
                           }
                 }                  }
                 if (itr->first == -1 || itr->last == -1) {                  state = ictx->state;
                         /* No transition? Eh? */  
                         fatalx("no transition from state");  
                 }  
   
                 /*                  /*
                  * Any state except print stops the current collection. This is                   * Any state except print stops the current collection. This is

Legend:
Removed from v.1.159  
changed lines
  Added in v.1.160