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

Diff for /src/usr.bin/tmux/screen-write.c between version 1.25 and 1.26

version 1.25, 2009/09/10 17:16:24 version 1.26, 2009/09/15 15:14:09
Line 371 
Line 371 
         struct grid_line        *gl;          struct grid_line        *gl;
         const struct grid_cell  *gc;          const struct grid_cell  *gc;
         u_char                  *udata;          u_char                  *udata;
         u_int                    xx, yy, cx, cy;          u_int                    xx, yy, cx, cy, ax, bx;
   
         cx = s->cx;          cx = s->cx;
         cy = s->cy;          cy = s->cy;
         for (yy = py; yy < py + ny; yy++) {          for (yy = py; yy < py + ny; yy++) {
                 gl = &gd->linedata[yy];                  gl = &gd->linedata[yy];
                 for (xx = px; xx < px + nx; xx++) {                  if (yy < gd->hsize + gd->sy) {
                         udata = NULL;                          /*
                            * Find start and end position and copy between
                         if (xx >= gl->cellsize || yy >= gd->hsize + gd->sy)                           * them. Limit to the real end of the line then use a
                                 gc = &grid_default_cell;                           * clear EOL only if copying to the end, otherwise
                         else {                           * could overwrite whatever is there already.
                                 gc = &gl->celldata[xx];                           */
                                 if (gc->flags & GRID_FLAG_UTF8)                          if (px > gl->cellsize)
                                         udata = gl->utf8data[xx].data;                                  ax = gl->cellsize;
                           else
                                   ax = px;
                           if (px + nx == gd->sx && px + nx > gl->cellsize)
                                   bx = gl->cellsize;
                           else
                                   bx = px + nx;
                           for (xx = ax; xx < bx; xx++) {
                                   udata = NULL;
                                   if (xx >= gl->cellsize)
                                           gc = &grid_default_cell;
                                   else {
                                           gc = &gl->celldata[xx];
                                           if (gc->flags & GRID_FLAG_UTF8)
                                                   udata = gl->utf8data[xx].data;
                                   }
                                   screen_write_cell(ctx, gc, udata);
                         }                          }
                           if (px + nx == gd->sx && px + nx > gl->cellsize)
                         screen_write_cell(ctx, gc, udata);                                  screen_write_clearendofline(ctx);
                 }                  } else
                           screen_write_clearline(ctx);
                 cy++;                  cy++;
                 screen_write_cursormove(ctx, cx, cy);                  screen_write_cursormove(ctx, cx, cy);
         }          }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26