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

Diff for /src/usr.bin/tmux/status.c between version 1.1 and 1.2

version 1.1, 2009/06/01 22:58:49 version 1.2, 2009/06/03 16:05:46
Line 47 
Line 47 
         struct window_pane             *wp;          struct window_pane             *wp;
         struct screen                  *sc = NULL, old_status;          struct screen                  *sc = NULL, old_status;
         char                           *left, *right, *text, *ptr;          char                           *left, *right, *text, *ptr;
         size_t                          llen, rlen, offset, xx, yy, sy;          size_t                          llen, llen2, rlen, rlen2, offset;
         size_t                          size, start, width;          size_t                          xx, yy, sy, size, start, width;
         struct grid_cell                stdgc, gc;          struct grid_cell                stdgc, gc;
         int                             larrow, rarrow;          int                             larrow, rarrow;
   
Line 78 
Line 78 
         left = status_replace(s, options_get_string(          left = status_replace(s, options_get_string(
             &s->options, "status-left"), c->status_timer.tv_sec);              &s->options, "status-left"), c->status_timer.tv_sec);
         llen = options_get_number(&s->options, "status-left-length");          llen = options_get_number(&s->options, "status-left-length");
         if (strlen(left) < llen)          llen2 = screen_write_strlen("%s", left);
                 llen = strlen(left);          if (llen2 < llen)
         left[llen] = '\0';                  llen = llen2;
   
         right = status_replace(s, options_get_string(          right = status_replace(s, options_get_string(
             &s->options, "status-right"), c->status_timer.tv_sec);              &s->options, "status-right"), c->status_timer.tv_sec);
         rlen = options_get_number(&s->options, "status-right-length");          rlen = options_get_number(&s->options, "status-right-length");
         if (strlen(right) < rlen)          rlen2 = screen_write_strlen("%s", right);
                 rlen = strlen(right);          if (rlen2 < rlen)
                   rlen = rlen2;
         right[rlen] = '\0';          right[rlen] = '\0';
   
         /*          /*
Line 163 
Line 164 
         screen_write_start(&ctx, NULL, &c->status);          screen_write_start(&ctx, NULL, &c->status);
         if (llen != 0) {          if (llen != 0) {
                 screen_write_cursormove(&ctx, 0, yy);                  screen_write_cursormove(&ctx, 0, yy);
                 screen_write_puts(&ctx, &stdgc, "%s ", left);                  screen_write_nputs(&ctx, llen + 1, &stdgc, "%s ", left);
                 if (larrow)                  if (larrow)
                         screen_write_putc(&ctx, &stdgc, ' ');                          screen_write_putc(&ctx, &stdgc, ' ');
         } else {          } else {
Line 220 
Line 221 
         /* Draw the last item. */          /* Draw the last item. */
         if (rlen != 0) {          if (rlen != 0) {
                 screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, yy);                  screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, yy);
                 screen_write_puts(&ctx, &stdgc, " %s", right);                  screen_write_nputs(&ctx, rlen + 1, &stdgc, " %s", right);
         }          }
   
         /* Draw the arrows. */          /* Draw the arrows. */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2