[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.44 and 1.45

version 1.44, 2009/11/18 13:16:33 version 1.45, 2009/11/19 10:22:07
Line 107 
Line 107 
   
         /* Work out the left and right strings. */          /* Work out the left and right strings. */
         left = status_replace(c, options_get_string(          left = status_replace(c, options_get_string(
             &s->options, "status-left"), c->status_timer.tv_sec);              &s->options, "status-left"), c->status_timer.tv_sec, 1);
         llen = options_get_number(&s->options, "status-left-length");          llen = options_get_number(&s->options, "status-left-length");
         llen2 = screen_write_cstrlen(utf8flag, "%s", left);          llen2 = screen_write_cstrlen(utf8flag, "%s", left);
         if (llen2 < llen)          if (llen2 < llen)
                 llen = llen2;                  llen = llen2;
   
         right = status_replace(c, options_get_string(          right = status_replace(c, options_get_string(
             &s->options, "status-right"), c->status_timer.tv_sec);              &s->options, "status-right"), c->status_timer.tv_sec, 1);
         rlen = options_get_number(&s->options, "status-right-length");          rlen = options_get_number(&s->options, "status-right-length");
         rlen2 = screen_write_cstrlen(utf8flag, "%s", right);          rlen2 = screen_write_cstrlen(utf8flag, "%s", right);
         if (rlen2 < rlen)          if (rlen2 < rlen)
Line 319 
Line 319 
 }  }
   
 char *  char *
 status_replace(struct client *c, const char *fmt, time_t t)  status_replace(struct client *c, const char *fmt, time_t t, int run_jobs)
 {  {
         struct session *s = c->session;          struct session *s = c->session;
         struct winlink *wl = s->curw;          struct winlink *wl = s->curw;
Line 355 
Line 355 
                         ptr = NULL;                          ptr = NULL;
                         switch (*iptr++) {                          switch (*iptr++) {
                         case '(':                          case '(':
                                 if (ptr == NULL) {                                  if (run_jobs) {
                                         ptr = status_job(c, &iptr);                                          if (ptr == NULL) {
                                         if (ptr == NULL)                                                  ptr = status_job(c, &iptr);
                                                 break;                                                  if (ptr == NULL)
                                         savedptr = ptr;                                                          break;
                                                   savedptr = ptr;
                                           }
                                   } else {
                                           /* Don't run jobs. Copy to ). */
                                           *optr++ = '#';
   
                                           iptr--; /* include [ */
                                           while (*iptr != ')' && *iptr != '\0') {
                                                   if (optr >=
                                                       out + (sizeof out) - 1)
                                                           break;
                                                   *optr++ = *iptr++;
                                           }
                                           break;
                                 }                                  }
                                 /* FALLTHROUGH */                                  /* FALLTHROUGH */
                         case 'H':                          case 'H':

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45