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

Diff for /src/usr.bin/tmux/screen-redraw.c between version 1.50 and 1.51

version 1.50, 2018/08/14 11:31:34 version 1.51, 2018/08/14 11:38:05
Line 30 
Line 30 
         int              top;          int              top;
   
         int              pane_status;          int              pane_status;
   
           u_int            sx;
           u_int            sy;
 };  };
   
 static int      screen_redraw_cell_border1(struct window_pane *, u_int, u_int);  static int      screen_redraw_cell_border1(struct window_pane *, u_int, u_int);
Line 393 
Line 396 
         if (c->flags & CLIENT_SUSPENDED)          if (c->flags & CLIENT_SUSPENDED)
                 return;                  return;
   
         memset (&ctx, 0, sizeof ctx);          memset(&ctx, 0, sizeof ctx);
         ctx.c = c;          ctx.c = c;
   
         if (c->flags & CLIENT_STATUSOFF)          if (c->flags & CLIENT_STATUSOFF)
Line 407 
Line 410 
                 ctx.top = 1;                  ctx.top = 1;
         ctx.pane_status = options_get_number(wo, "pane-border-status");          ctx.pane_status = options_get_number(wo, "pane-border-status");
   
           ctx.sx = tty->sx;
           ctx.sy = tty->sy - ctx.lines;
   
         if (ctx.lines == 0)          if (ctx.lines == 0)
                 draw_status = 0;                  draw_status = 0;
   
Line 501 
Line 507 
         const char              *tmp;          const char              *tmp;
         size_t                   msglen = 0;          size_t                   msglen = 0;
   
         small = (tty->sy - ctx->lines + ctx->top > w->sy) || (tty->sx > w->sx);          small = (ctx->sy + ctx->top > w->sy) || (ctx->sx > w->sx);
         if (small) {          if (small) {
                 flags = w->flags & (WINDOW_FORCEWIDTH|WINDOW_FORCEHEIGHT);                  flags = w->flags & (WINDOW_FORCEWIDTH|WINDOW_FORCEHEIGHT);
                 if (flags == (WINDOW_FORCEWIDTH|WINDOW_FORCEHEIGHT))                  if (flags == (WINDOW_FORCEWIDTH|WINDOW_FORCEHEIGHT))
Line 518 
Line 524 
                     w->sx, w->sy, tmp);                      w->sx, w->sy, tmp);
                 msglen = strlen(msg);                  msglen = strlen(msg);
   
                 if (tty->sy - 1 - ctx->lines + ctx->top > w->sy &&                  if (ctx->sy - 1 + ctx->top > w->sy && ctx->sx >= msglen) {
                     tty->sx >= msglen) {                          msgx = ctx->sx - msglen;
                         msgx = tty->sx - msglen;                          msgy = ctx->sy - 1 + ctx->top;
                         msgy = tty->sy - 1 - ctx->lines + ctx->top;                  } else if (ctx->sx - w->sx > msglen) {
                 } else if (tty->sx - w->sx > msglen) {                          msgx = ctx->sx - msglen;
                         msgx = tty->sx - msglen;                          msgy = ctx->sy - 1 + ctx->top;
                         msgy = tty->sy - 1 - ctx->lines + ctx->top;  
                 } else                  } else
                         small = 0;                          small = 0;
         }          }
Line 538 
Line 543 
         memcpy(&m_active_gc, &active_gc, sizeof m_active_gc);          memcpy(&m_active_gc, &active_gc, sizeof m_active_gc);
         m_active_gc.attr ^= GRID_ATTR_REVERSE;          m_active_gc.attr ^= GRID_ATTR_REVERSE;
   
         for (j = 0; j < tty->sy - ctx->lines; j++) {          for (j = 0; j < ctx->sy; j++) {
                 for (i = 0; i < tty->sx; i++) {                  for (i = 0; i < ctx->sx; i++) {
                         screen_redraw_draw_borders_cell(ctx, i, j, small,                          screen_redraw_draw_borders_cell(ctx, i, j, small,
                             msgx, msgy, &m_active_gc, &active_gc, &m_other_gc,                              msgx, msgy, &m_active_gc, &active_gc, &m_other_gc,
                             &other_gc);                              &other_gc);
Line 589 
Line 594 
         if (ctx->top)          if (ctx->top)
                 y = 0;                  y = 0;
         else          else
                 y = tty->sy - ctx->lines;                  y = ctx->sy;
         for (i = 0; i < ctx->lines; i++)          for (i = 0; i < ctx->lines; i++)
                 tty_draw_line(tty, NULL, &c->status.status, i, 0, y);                  tty_draw_line(tty, NULL, &c->status.status, i, 0, y);
 }  }

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51