[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.126 and 1.127

version 1.126, 2017/06/09 09:21:24 version 1.127, 2017/08/29 09:28:45
Line 87 
Line 87 
         struct utf8_data        utf8data;          struct utf8_data        utf8data;
   
         int                     ch;          int                     ch;
           int                     last;
   
         int                     flags;          int                     flags;
 #define INPUT_DISCARD 0x1  #define INPUT_DISCARD 0x1
Line 221 
Line 222 
         INPUT_CSI_ICH,          INPUT_CSI_ICH,
         INPUT_CSI_IL,          INPUT_CSI_IL,
         INPUT_CSI_RCP,          INPUT_CSI_RCP,
           INPUT_CSI_REP,
         INPUT_CSI_RM,          INPUT_CSI_RM,
         INPUT_CSI_RM_PRIVATE,          INPUT_CSI_RM_PRIVATE,
         INPUT_CSI_SCP,          INPUT_CSI_SCP,
Line 252 
Line 254 
         { 'S', "",  INPUT_CSI_SU },          { 'S', "",  INPUT_CSI_SU },
         { 'X', "",  INPUT_CSI_ECH },          { 'X', "",  INPUT_CSI_ECH },
         { 'Z', "",  INPUT_CSI_CBT },          { 'Z', "",  INPUT_CSI_CBT },
           { 'b', "",  INPUT_CSI_REP },
         { 'c', "",  INPUT_CSI_DA },          { 'c', "",  INPUT_CSI_DA },
         { 'c', ">", INPUT_CSI_DA_TWO },          { 'c', ">", INPUT_CSI_DA_TWO },
         { 'd', "",  INPUT_CSI_VPA },          { 'd', "",  INPUT_CSI_VPA },
Line 848 
Line 851 
   
         input_clear(ictx);          input_clear(ictx);
   
           ictx->last = -1;
   
         ictx->state = &input_state_ground;          ictx->state = &input_state_ground;
         ictx->flags = 0;          ictx->flags = 0;
 }  }
Line 1062 
Line 1067 
   
         utf8_set(&ictx->cell.cell.data, ictx->ch);          utf8_set(&ictx->cell.cell.data, ictx->ch);
         screen_write_collect_add(&ictx->ctx, &ictx->cell.cell);          screen_write_collect_add(&ictx->ctx, &ictx->cell.cell);
           ictx->last = ictx->ch;
   
         ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;          ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;
   
Line 1168 
Line 1174 
                 break;                  break;
         }          }
   
           ictx->last = -1;
         return (0);          return (0);
 }  }
   
Line 1245 
Line 1252 
                 break;                  break;
         }          }
   
           ictx->last = -1;
         return (0);          return (0);
 }  }
   
Line 1255 
Line 1263 
         struct screen_write_ctx        *sctx = &ictx->ctx;          struct screen_write_ctx        *sctx = &ictx->ctx;
         struct screen                  *s = sctx->s;          struct screen                  *s = sctx->s;
         struct input_table_entry       *entry;          struct input_table_entry       *entry;
         int                             n, m;          int                             i, n, m;
         u_int                           cx;          u_int                           cx;
   
         if (ictx->flags & INPUT_DISCARD)          if (ictx->flags & INPUT_DISCARD)
Line 1421 
Line 1429 
                 screen_write_insertline(sctx, input_get(ictx, 0, 1, 1),                  screen_write_insertline(sctx, input_get(ictx, 0, 1, 1),
                     ictx->cell.cell.bg);                      ictx->cell.cell.bg);
                 break;                  break;
           case INPUT_CSI_REP:
                   if (ictx->last == -1)
                           break;
                   ictx->ch = ictx->last;
   
                   n = input_get(ictx, 0, 1, 1);
                   for (i = 0; i < n; i++)
                           input_print(ictx);
                   break;
         case INPUT_CSI_RCP:          case INPUT_CSI_RCP:
                 memcpy(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);                  memcpy(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);
                 screen_write_cursormove(sctx, ictx->old_cx, ictx->old_cy);                  screen_write_cursormove(sctx, ictx->old_cx, ictx->old_cy);
Line 1473 
Line 1490 
                 break;                  break;
         }          }
   
           ictx->last = -1;
         return (0);          return (0);
 }  }
   
Line 1877 
Line 1895 
   
         input_clear(ictx);          input_clear(ictx);
         input_start_timer(ictx);          input_start_timer(ictx);
           ictx->last = -1;
 }  }
   
 /* DCS terminator (ST) received. */  /* DCS terminator (ST) received. */
Line 1909 
Line 1928 
   
         input_clear(ictx);          input_clear(ictx);
         input_start_timer(ictx);          input_start_timer(ictx);
           ictx->last = -1;
 }  }
   
 /* OSC terminator (ST) received. */  /* OSC terminator (ST) received. */
Line 1976 
Line 1996 
   
         input_clear(ictx);          input_clear(ictx);
         input_start_timer(ictx);          input_start_timer(ictx);
           ictx->last = -1;
 }  }
   
 /* APC terminator (ST) received. */  /* APC terminator (ST) received. */
Line 2000 
Line 2021 
   
         input_clear(ictx);          input_clear(ictx);
         input_start_timer(ictx);          input_start_timer(ictx);
           ictx->last = -1;
 }  }
   
 /* Rename terminator (ST) received. */  /* Rename terminator (ST) received. */
Line 2029 
Line 2051 
                 fatalx("UTF-8 open invalid %#x", ictx->ch);                  fatalx("UTF-8 open invalid %#x", ictx->ch);
   
         log_debug("%s %hhu", __func__, ud->size);          log_debug("%s %hhu", __func__, ud->size);
           ictx->last = -1;
   
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.126  
changed lines
  Added in v.1.127