[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.97 and 1.98

version 1.97, 2019/07/06 20:37:29 version 1.98, 2019/07/16 10:30:56
Line 547 
Line 547 
 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)
 {  {
         struct grid_line        *gl;          struct grid_line        *gl;
         u_int                    xx, yy;          u_int                    xx, yy, ox, sx;
   
         if (nx == 0 || ny == 0)          if (nx == 0 || ny == 0)
                 return;                  return;
Line 564 
Line 564 
   
         for (yy = py; yy < py + ny; yy++) {          for (yy = py; yy < py + ny; yy++) {
                 gl = &gd->linedata[yy];                  gl = &gd->linedata[yy];
                 if (px + nx >= gd->sx && px < gl->cellused)  
                         gl->cellused = px;                  sx = gd->sx;
                 if (px > gl->cellsize && COLOUR_DEFAULT(bg))                  if (sx > gl->cellsize)
                         continue;                          sx = gl->cellsize;
                 if (px + nx >= gl->cellsize && COLOUR_DEFAULT(bg)) {                  ox = nx;
                         gl->cellsize = px;                  if (COLOUR_DEFAULT(bg)) {
                         continue;                          if (px > sx)
                                   continue;
                           if (px + nx > sx)
                                   ox = sx - px;
                 }                  }
                 grid_expand_line(gd, yy, px + nx, 8); /* default bg first */  
                 for (xx = px; xx < px + nx; xx++)                  grid_expand_line(gd, yy, px + ox, 8); /* default bg first */
                   for (xx = px; xx < px + ox; xx++)
                         grid_clear_cell(gd, xx, yy, bg);                          grid_clear_cell(gd, xx, yy, bg);
         }          }
 }  }
Line 1215 
Line 1219 
         struct grid_line        *gl;          struct grid_line        *gl;
         struct grid_cell         gc;          struct grid_cell         gc;
         u_int                    yy, width, i, at, first;          u_int                    yy, width, i, at, first;
   
           /* Do not reflow to the same size. */
           if (sx == gd->sx)
                   return;
   
         /*          /*
          * Create a destination grid. This is just used as a container for the           * Create a destination grid. This is just used as a container for the

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98