[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.52 and 1.53

version 1.52, 2018/08/18 16:14:03 version 1.53, 2018/08/19 16:45:03
Line 318 
Line 318 
 static void  static void
 screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)  screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
 {  {
         struct client           *c = ctx->c;          struct client           *c = ctx->c;
         struct window           *w = c->session->curw->window;          struct window           *w = c->session->curw->window;
         struct options          *oo = c->session->options;          struct options          *oo = c->session->options;
         struct tty              *tty = &c->tty;          struct tty              *tty = &c->tty;
Line 344 
Line 344 
 }  }
   
 /* Update status line and change flags if unchanged. */  /* Update status line and change flags if unchanged. */
 void  static void
 screen_redraw_update(struct client *c)  screen_redraw_update(struct client *c)
 {  {
         struct window           *w = c->session->curw->window;          struct window           *w = c->session->curw->window;
Line 359 
Line 359 
         else          else
                 redraw = status_redraw(c);                  redraw = status_redraw(c);
         if (!redraw)          if (!redraw)
                 c->flags &= ~CLIENT_STATUS;                  c->flags &= ~CLIENT_REDRAWSTATUS;
   
         if (options_get_number(wo, "pane-border-status") != CELL_STATUS_OFF) {          if (options_get_number(wo, "pane-border-status") != CELL_STATUS_OFF) {
                 redraw = 0;                  redraw = 0;
Line 368 
Line 368 
                                 redraw = 1;                                  redraw = 1;
                 }                  }
                 if (redraw)                  if (redraw)
                         c->flags |= CLIENT_BORDERS;                          c->flags |= CLIENT_REDRAWBORDERS;
         }          }
 }  }
   
Line 376 
Line 376 
 static void  static void
 screen_redraw_set_context(struct client *c, struct screen_redraw_ctx *ctx)  screen_redraw_set_context(struct client *c, struct screen_redraw_ctx *ctx)
 {  {
         struct session  *s = c->session;          struct session  *s = c->session;
         struct options  *oo = s->options;          struct options  *oo = s->options;
         struct window   *w = s->curw->window;          struct window   *w = s->curw->window;
         struct options  *wo = w->options;          struct options  *wo = w->options;
   
         memset(ctx, 0, sizeof *ctx);          memset(ctx, 0, sizeof *ctx);
         ctx->c = c;          ctx->c = c;
Line 395 
Line 395 
   
 /* Redraw entire screen. */  /* Redraw entire screen. */
 void  void
 screen_redraw_screen(struct client *c, int draw_panes, int draw_status,  screen_redraw_screen(struct client *c)
     int draw_borders)  
 {  {
         struct screen_redraw_ctx         ctx;          struct screen_redraw_ctx        ctx;
   
         if (c->flags & CLIENT_SUSPENDED)          if (c->flags & CLIENT_SUSPENDED)
                 return;                  return;
   
           screen_redraw_update(c);
         screen_redraw_set_context(c, &ctx);          screen_redraw_set_context(c, &ctx);
   
         if (ctx.lines == 0)          if (c->flags & (CLIENT_REDRAWWINDOW|CLIENT_REDRAWBORDERS)) {
                 draw_status = 0;                  if (ctx.pane_status != CELL_STATUS_OFF)
                           screen_redraw_draw_pane_status(&ctx);
         if (draw_borders)  
                 screen_redraw_draw_borders(&ctx);                  screen_redraw_draw_borders(&ctx);
         if (draw_borders && ctx.pane_status != CELL_STATUS_OFF)          }
                 screen_redraw_draw_pane_status(&ctx);          if (c->flags & CLIENT_REDRAWWINDOW)
         if (draw_panes)  
                 screen_redraw_draw_panes(&ctx);                  screen_redraw_draw_panes(&ctx);
         if (draw_status)          if (ctx.lines != 0 && (c->flags & CLIENT_REDRAWSTATUS))
                 screen_redraw_draw_status(&ctx);                  screen_redraw_draw_status(&ctx);
         tty_reset(&c->tty);          tty_reset(&c->tty);
 }  }
Line 447 
Line 445 
     struct grid_cell *active_gc, struct grid_cell *m_other_gc,      struct grid_cell *active_gc, struct grid_cell *m_other_gc,
     struct grid_cell *other_gc)      struct grid_cell *other_gc)
 {  {
         struct client           *c = ctx->c;          struct client           *c = ctx->c;
         struct session          *s = c->session;          struct session          *s = c->session;
         struct window           *w = s->curw->window;          struct window           *w = s->curw->window;
         struct tty              *tty = &c->tty;          struct tty              *tty = &c->tty;
         struct window_pane      *wp;          struct window_pane      *wp;
         struct window_pane      *active = w->active;          struct window_pane      *active = w->active;
         struct window_pane      *marked = marked_pane.wp;          struct window_pane      *marked = marked_pane.wp;
         u_int                    type;          u_int                    type;
         int                      flag, pane_status = ctx->pane_status;          int                      flag, pane_status = ctx->pane_status;
   
         type = screen_redraw_check_cell(c, x, y, pane_status, &wp);          type = screen_redraw_check_cell(c, x, y, pane_status, &wp);
         if (type == CELL_INSIDE)          if (type == CELL_INSIDE)
Line 492 
Line 490 
         struct tty              *tty = &c->tty;          struct tty              *tty = &c->tty;
         struct grid_cell         m_active_gc, active_gc, m_other_gc, other_gc;          struct grid_cell         m_active_gc, active_gc, m_other_gc, other_gc;
         struct grid_cell         msg_gc;          struct grid_cell         msg_gc;
         u_int                    i, j, msgx = 0, msgy = 0;          u_int                    i, j, msgx = 0, msgy = 0;
         int                      small, flags;          int                      small, flags;
         char                     msg[256];          char                     msg[256];
         const char              *tmp;          const char              *tmp;
Line 558 
Line 556 
         struct window           *w = c->session->curw->window;          struct window           *w = c->session->curw->window;
         struct tty              *tty = &c->tty;          struct tty              *tty = &c->tty;
         struct window_pane      *wp;          struct window_pane      *wp;
         u_int                    i, y;          u_int                    i, y;
   
         if (ctx->top)          if (ctx->top)
                 y = ctx->lines;                  y = ctx->lines;

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53