=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.44 retrieving revision 1.45 diff -c -r1.44 -r1.45 *** src/usr.bin/tmux/status.c 2009/11/18 13:16:33 1.44 --- src/usr.bin/tmux/status.c 2009/11/19 10:22:07 1.45 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.44 2009/11/18 13:16:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.45 2009/11/19 10:22:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 107,120 **** /* Work out the left and right strings. */ left = status_replace(c, options_get_string( ! &s->options, "status-left"), c->status_timer.tv_sec); llen = options_get_number(&s->options, "status-left-length"); llen2 = screen_write_cstrlen(utf8flag, "%s", left); if (llen2 < llen) llen = llen2; right = status_replace(c, options_get_string( ! &s->options, "status-right"), c->status_timer.tv_sec); rlen = options_get_number(&s->options, "status-right-length"); rlen2 = screen_write_cstrlen(utf8flag, "%s", right); if (rlen2 < rlen) --- 107,120 ---- /* Work out the left and right strings. */ left = status_replace(c, options_get_string( ! &s->options, "status-left"), c->status_timer.tv_sec, 1); llen = options_get_number(&s->options, "status-left-length"); llen2 = screen_write_cstrlen(utf8flag, "%s", left); if (llen2 < llen) llen = llen2; right = status_replace(c, options_get_string( ! &s->options, "status-right"), c->status_timer.tv_sec, 1); rlen = options_get_number(&s->options, "status-right-length"); rlen2 = screen_write_cstrlen(utf8flag, "%s", right); if (rlen2 < rlen) *************** *** 319,325 **** } char * ! status_replace(struct client *c, const char *fmt, time_t t) { struct session *s = c->session; struct winlink *wl = s->curw; --- 319,325 ---- } char * ! status_replace(struct client *c, const char *fmt, time_t t, int run_jobs) { struct session *s = c->session; struct winlink *wl = s->curw; *************** *** 355,365 **** ptr = NULL; switch (*iptr++) { case '(': ! if (ptr == NULL) { ! ptr = status_job(c, &iptr); ! if (ptr == NULL) ! break; ! savedptr = ptr; } /* FALLTHROUGH */ case 'H': --- 355,379 ---- ptr = NULL; switch (*iptr++) { case '(': ! if (run_jobs) { ! if (ptr == NULL) { ! ptr = status_job(c, &iptr); ! if (ptr == NULL) ! 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 */ case 'H':