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

Diff for /src/usr.bin/tmux/tty.c between version 1.345 and 1.346

version 1.345, 2020/03/17 12:20:12 version 1.346, 2020/03/24 08:09:44
Line 1250 
Line 1250 
         return (&new);          return (&new);
 }  }
   
   static int
   tty_check_overlay(struct tty *tty, u_int px, u_int py)
   {
           struct client   *c = tty->client;
   
           if (c->overlay_check == NULL)
                   return (1);
           return (c->overlay_check(c, px, py));
   }
   
 void  void
 tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,  tty_draw_line(struct tty *tty, struct window_pane *wp, struct screen *s,
     u_int px, u_int py, u_int nx, u_int atx, u_int aty)      u_int px, u_int py, u_int nx, u_int atx, u_int aty)
Line 1329 
Line 1339 
                 grid_view_get_cell(gd, px + i, py, &gc);                  grid_view_get_cell(gd, px + i, py, &gc);
                 gcp = tty_check_codeset(tty, &gc);                  gcp = tty_check_codeset(tty, &gc);
                 if (len != 0 &&                  if (len != 0 &&
                     ((gcp->attr & GRID_ATTR_CHARSET) ||                      (!tty_check_overlay(tty, atx + ux + width, aty) ||
                       (gcp->attr & GRID_ATTR_CHARSET) ||
                     gcp->flags != last.flags ||                      gcp->flags != last.flags ||
                     gcp->attr != last.attr ||                      gcp->attr != last.attr ||
                     gcp->fg != last.fg ||                      gcp->fg != last.fg ||
Line 1358 
Line 1369 
                         screen_select_cell(s, &last, gcp);                          screen_select_cell(s, &last, gcp);
                 else                  else
                         memcpy(&last, gcp, sizeof last);                          memcpy(&last, gcp, sizeof last);
                 if (ux + gcp->data.width > nx) {                  if (!tty_check_overlay(tty, atx + ux, aty))
                           ux += gcp->data.width;
                   else if (ux + gcp->data.width > nx) {
                         tty_attributes(tty, &last, wp);                          tty_attributes(tty, &last, wp);
                         tty_cursor(tty, atx + ux, aty);                          tty_cursor(tty, atx + ux, aty);
                         for (j = 0; j < gcp->data.width; j++) {                          for (j = 0; j < gcp->data.width; j++) {
Line 1372 
Line 1385 
                         tty_cursor(tty, atx + ux, aty);                          tty_cursor(tty, atx + ux, aty);
                         for (j = 0; j < gcp->data.size; j++)                          for (j = 0; j < gcp->data.size; j++)
                                 tty_putc(tty, gcp->data.data[j]);                                  tty_putc(tty, gcp->data.data[j]);
                         ux += gc.data.width;                          ux += gcp->data.width;
                 } else {                  } else {
                         memcpy(buf + len, gcp->data.data, gcp->data.size);                          memcpy(buf + len, gcp->data.data, gcp->data.size);
                         len += gcp->data.size;                          len += gcp->data.size;

Legend:
Removed from v.1.345  
changed lines
  Added in v.1.346