=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.108 retrieving revision 1.109 diff -c -r1.108 -r1.109 *** src/usr.bin/tmux/status.c 2014/01/28 23:07:09 1.108 --- src/usr.bin/tmux/status.c 2014/02/14 12:37:54 1.109 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.108 2014/01/28 23:07:09 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.109 2014/02/14 12:37:54 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 445,455 **** if (fmt == NULL) return (xstrdup("")); ! if (s == NULL) s = c->session; ! if (wl == NULL) wl = s->curw; ! if (wp == NULL) wp = wl->window->active; len = strftime(in, sizeof in, fmt, localtime(&t)); --- 445,455 ---- if (fmt == NULL) return (xstrdup("")); ! if (s == NULL && c != NULL) s = c->session; ! if (wl == NULL && s != NULL) wl = s->curw; ! if (wp == NULL && wl != NULL) wp = wl->window->active; len = strftime(in, sizeof in, fmt, localtime(&t)); *************** *** 472,481 **** *optr = '\0'; ft = format_create(); ! format_client(ft, c); ! format_session(ft, s); ! format_winlink(ft, s, wl); ! format_window_pane(ft, wp); expanded = format_expand(ft, out); format_free(ft); return (expanded); --- 472,485 ---- *optr = '\0'; ft = format_create(); ! if (c != NULL) ! format_client(ft, c); ! if (s != NULL) ! format_session(ft, s); ! if (s != NULL && wl != NULL) ! format_winlink(ft, s, wl); ! if (wp != NULL) ! format_window_pane(ft, wp); expanded = format_expand(ft, out); format_free(ft); return (expanded);