[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.118 and 1.119

version 1.118, 2020/06/05 09:35:41 version 1.119, 2020/08/07 07:02:57
Line 463 
Line 463 
                 sx = gd->sx / 4;                  sx = gd->sx / 4;
         else if (sx < gd->sx / 2)          else if (sx < gd->sx / 2)
                 sx = gd->sx / 2;                  sx = gd->sx / 2;
         else          else if (gd->sx > sx)
                 sx = gd->sx;                  sx = gd->sx;
   
         gl->celldata = xreallocarray(gl->celldata, sx, sizeof *gl->celldata);          gl->celldata = xreallocarray(gl->celldata, sx, sizeof *gl->celldata);
Line 1277 
Line 1277 
         struct grid             *target;          struct grid             *target;
         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;
   
         /*          /*
          * 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
Line 1294 
Line 1294 
                         continue;                          continue;
   
                 /*                  /*
                  * Work out the width of this line. first is the width of the                   * Work out the width of this line. at is the point at which
                  * first character, at is the point at which the available                   * the available width is hit, and width is the full line
                  * width is hit, and width is the full line width.                   * width.
                  */                   */
                 first = at = width = 0;                  at = width = 0;
                 if (~gl->flags & GRID_LINE_EXTENDED) {                  if (~gl->flags & GRID_LINE_EXTENDED) {
                         first = 1;  
                         width = gl->cellused;                          width = gl->cellused;
                         if (width > sx)                          if (width > sx)
                                 at = sx;                                  at = sx;
Line 1309 
Line 1308 
                 } else {                  } else {
                         for (i = 0; i < gl->cellused; i++) {                          for (i = 0; i < gl->cellused; i++) {
                                 grid_get_cell1(gl, i, &gc);                                  grid_get_cell1(gl, i, &gc);
                                 if (i == 0)  
                                         first = gc.data.width;  
                                 if (at == 0 && width + gc.data.width > sx)                                  if (at == 0 && width + gc.data.width > sx)
                                         at = i;                                          at = i;
                                 width += gc.data.width;                                  width += gc.data.width;
Line 1318 
Line 1315 
                 }                  }
   
                 /*                  /*
                  * If the line is exactly right or the first character is wider                   * If the line is exactly right, just move it across
                  * than the target width, just move it across unchanged.                   * unchanged.
                  */                   */
                 if (width == sx || first > sx) {                  if (width == sx) {
                         grid_reflow_move(target, gl);                          grid_reflow_move(target, gl);
                         continue;                          continue;
                 }                  }

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119