[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.174.4.1 and 1.175

version 1.174.4.1, 2020/10/29 16:34:15 version 1.175, 2020/05/16 14:16:25
Line 254 
Line 254 
         INPUT_CSI_TBC,          INPUT_CSI_TBC,
         INPUT_CSI_VPA,          INPUT_CSI_VPA,
         INPUT_CSI_WINOPS,          INPUT_CSI_WINOPS,
           INPUT_CSI_XDA,
 };  };
   
 /* Control (CSI) command table. */  /* Control (CSI) command table. */
Line 290 
Line 291 
         { 'm', "",  INPUT_CSI_SGR },          { 'm', "",  INPUT_CSI_SGR },
         { 'n', "",  INPUT_CSI_DSR },          { 'n', "",  INPUT_CSI_DSR },
         { 'q', " ", INPUT_CSI_DECSCUSR },          { 'q', " ", INPUT_CSI_DECSCUSR },
           { 'q', ">", INPUT_CSI_XDA },
         { 'r', "",  INPUT_CSI_DECSTBM },          { 'r', "",  INPUT_CSI_DECSTBM },
         { 's', "",  INPUT_CSI_SCP },          { 's', "",  INPUT_CSI_SCP },
         { 't', "",  INPUT_CSI_WINOPS },          { 't', "",  INPUT_CSI_WINOPS },
Line 1324 
Line 1326 
         struct input_table_entry       *entry;          struct input_table_entry       *entry;
         int                             i, n, m;          int                             i, n, m;
         u_int                           cx, bg = ictx->cell.cell.bg;          u_int                           cx, bg = ictx->cell.cell.bg;
         char                           *copy, *cp;  
   
         if (ictx->flags & INPUT_DISCARD)          if (ictx->flags & INPUT_DISCARD)
                 return (0);                  return (0);
Line 1456 
Line 1457 
                 case 6:                  case 6:
                         input_reply(ictx, "\033[%u;%uR", s->cy + 1, s->cx + 1);                          input_reply(ictx, "\033[%u;%uR", s->cy + 1, s->cx + 1);
                         break;                          break;
                 case 1337: /* Terminal version, from iTerm2. */  
                         copy = xstrdup(getversion());  
                         for (cp = copy; *cp != '\0'; cp++)  
                                 *cp = toupper((u_char)*cp);  
                         input_reply(ictx, "\033[TMUX %sn", copy);  
                         free(copy);  
                         break;  
                 default:                  default:
                         log_debug("%s: unknown '%c'", __func__, ictx->ch);                          log_debug("%s: unknown '%c'", __func__, ictx->ch);
                         break;                          break;
Line 1597 
Line 1591 
                 if (n != -1)                  if (n != -1)
                         screen_set_cursor_style(s, n);                          screen_set_cursor_style(s, n);
                 break;                  break;
           case INPUT_CSI_XDA:
                   n = input_get(ictx, 0, 0, 0);
                   if (n != 0)
                           input_reply(ictx, "\033P>|tmux %s\033\\", getversion());
                   break;
   
         }          }
   
         ictx->last = -1;          ictx->last = -1;
Line 1968 
Line 1968 
                                 free(copy);                                  free(copy);
                                 return;                                  return;
                         }                          }
                 } else {                  } else
                         n++;                          n++;
                         if (n == nitems(p)) {  
                                 free(copy);  
                                 return;  
                         }  
                 }  
                 log_debug("%s: %u = %d", __func__, n - 1, p[n - 1]);                  log_debug("%s: %u = %d", __func__, n - 1, p[n - 1]);
         }          }
         free(copy);          free(copy);

Legend:
Removed from v.1.174.4.1  
changed lines
  Added in v.1.175