=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.79 retrieving revision 1.80 diff -c -r1.79 -r1.80 *** src/usr.bin/tmux/status.c 2011/11/05 09:06:31 1.79 --- src/usr.bin/tmux/status.c 2011/11/15 23:19:51 1.80 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.79 2011/11/05 09:06:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.80 2011/11/15 23:19:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 372,377 **** --- 372,378 ---- char ch, tmp[256], *ptr, *endptr, *freeptr; size_t ptrlen; long limit; + u_int idx; if (s == NULL) s = c->session; *************** *** 422,429 **** ptr = tmp; goto do_replace; case 'P': xsnprintf( ! tmp, sizeof tmp, "%u", window_pane_index(wl->window, wp)); ptr = tmp; goto do_replace; case 'S': --- 423,432 ---- ptr = tmp; goto do_replace; case 'P': + if (window_pane_index(wp, &idx) != 0) + fatalx("index not found"); xsnprintf( ! tmp, sizeof tmp, "%u", idx); ptr = tmp; goto do_replace; case 'S':