[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.136 and 1.137

version 1.136, 2018/08/16 14:04:03 version 1.137, 2018/10/18 07:57:57
Line 1835 
Line 1835 
 static void  static void
 input_csi_dispatch_sgr_colon(struct input_ctx *ictx, u_int i)  input_csi_dispatch_sgr_colon(struct input_ctx *ictx, u_int i)
 {  {
         char            *s = ictx->param_list[i].str, *copy, *ptr, *out;          struct grid_cell        *gc = &ictx->cell.cell;
         int              p[8];          char                    *s = ictx->param_list[i].str, *copy, *ptr, *out;
         u_int            n;          int                      p[8];
         const char      *errstr;          u_int                    n;
           const char              *errstr;
   
         for (n = 0; n < nitems(p); n++)          for (n = 0; n < nitems(p); n++)
                 p[n] = -1;                  p[n] = -1;
Line 1857 
Line 1858 
         }          }
         free(copy);          free(copy);
   
         if (n == 0 || (p[0] != 38 && p[0] != 48))          if (n == 0)
                 return;                  return;
           if (p[0] == 4) {
                   if (n != 2)
                           return;
                   switch (p[1]) {
                   case 0:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           break;
                   case 1:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           gc->attr |= GRID_ATTR_UNDERSCORE;
                           break;
                   case 2:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           gc->attr |= GRID_ATTR_UNDERSCORE_2;
                           break;
                   case 3:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           gc->attr |= GRID_ATTR_UNDERSCORE_3;
                           break;
                   case 4:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           gc->attr |= GRID_ATTR_UNDERSCORE_4;
                           break;
                   case 5:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                           gc->attr |= GRID_ATTR_UNDERSCORE_5;
                           break;
                   }
                   return;
           }
           if (p[0] != 38 && p[0] != 48)
                   return;
         if (p[1] == -1)          if (p[1] == -1)
                 i = 2;                  i = 2;
         else          else
Line 1927 
Line 1960 
                         gc->attr |= GRID_ATTR_ITALICS;                          gc->attr |= GRID_ATTR_ITALICS;
                         break;                          break;
                 case 4:                  case 4:
                           gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                         gc->attr |= GRID_ATTR_UNDERSCORE;                          gc->attr |= GRID_ATTR_UNDERSCORE;
                         break;                          break;
                 case 5:                  case 5:
Line 1948 
Line 1982 
                         gc->attr &= ~GRID_ATTR_ITALICS;                          gc->attr &= ~GRID_ATTR_ITALICS;
                         break;                          break;
                 case 24:                  case 24:
                         gc->attr &= ~GRID_ATTR_UNDERSCORE;                          gc->attr &= ~GRID_ATTR_ALL_UNDERSCORE;
                         break;                          break;
                 case 25:                  case 25:
                         gc->attr &= ~GRID_ATTR_BLINK;                          gc->attr &= ~GRID_ATTR_BLINK;

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137