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

Diff for /src/usr.bin/tmux/grid.c between version 1.87 and 1.88

version 1.87, 2018/10/18 07:57:57 version 1.88, 2018/10/25 15:13:38
Line 418 
Line 418 
 grid_empty_line(struct grid *gd, u_int py, u_int bg)  grid_empty_line(struct grid *gd, u_int py, u_int bg)
 {  {
         memset(&gd->linedata[py], 0, sizeof gd->linedata[py]);          memset(&gd->linedata[py], 0, sizeof gd->linedata[py]);
         if (bg != 8)          if (!COLOUR_DEFAULT(bg))
                 grid_expand_line(gd, py, gd->sx, bg);                  grid_expand_line(gd, py, gd->sx, bg);
 }  }
   
Line 524 
Line 524 
 void  void
 grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)  grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)
 {  {
         u_int   xx, yy;          struct grid_line        *gl;
           u_int                    xx, yy;
   
         if (nx == 0 || ny == 0)          if (nx == 0 || ny == 0)
                 return;                  return;
Line 540 
Line 541 
                 return;                  return;
   
         for (yy = py; yy < py + ny; yy++) {          for (yy = py; yy < py + ny; yy++) {
                 if (px + nx >= gd->sx && px < gd->linedata[yy].cellused)                  gl = &gd->linedata[yy];
                         gd->linedata[yy].cellused = px;                  if (px + nx >= gd->sx && px < gl->cellused)
                 if (px > gd->linedata[yy].cellsize && bg == 8)                          gl->cellused = px;
                   if (px > gl->cellsize && COLOUR_DEFAULT(bg))
                         continue;                          continue;
                 if (px + nx >= gd->linedata[yy].cellsize && bg == 8) {                  if (px + nx >= gl->cellsize && COLOUR_DEFAULT(bg)) {
                         gd->linedata[yy].cellsize = px;                          gl->cellsize = px;
                         continue;                          continue;
                 }                  }
                 grid_expand_line(gd, yy, px + nx, 8); /* default bg first */                  grid_expand_line(gd, yy, px + nx, 8); /* default bg first */

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88