=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- src/usr.bin/tmux/status.c 2010/01/26 21:36:53 1.57 +++ src/usr.bin/tmux/status.c 2010/01/27 20:26:42 1.58 @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.57 2010/01/26 21:36:53 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.58 2010/01/27 20:26:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -302,18 +302,20 @@ } /* Figure out the offset for the window list. */ - wloffset = 1; + if (llen != 0) + wloffset = llen + 1; + else + wloffset = 0; if (wlwidth < wlavailable) { switch (options_get_number(&s->options, "status-justify")) { case 1: /* centered */ - wloffset = 1 + (wlavailable - wlwidth) / 2; + wloffset += (wlavailable - wlwidth) / 2; break; case 2: /* right */ - wloffset = 1 + (wlavailable - wlwidth); + wloffset += (wlavailable - wlwidth); break; } } - wloffset += llen; if (larrow != 0) wloffset++;