=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/status.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/tmux/status.c 2009/06/04 21:43:24 1.4 --- src/usr.bin/tmux/status.c 2009/06/26 15:13:39 1.5 *************** *** 1,4 **** ! /* $OpenBSD: status.c,v 1.4 2009/06/04 21:43:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: status.c,v 1.5 2009/06/26 15:13:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 91,97 **** rlen2 = screen_write_strlen(utf8flag, "%s", right); if (rlen2 < rlen) rlen = rlen2; - right[rlen] = '\0'; /* * Figure out how much space we have for the window list. If there isn't --- 91,96 ---- *************** *** 167,174 **** screen_write_start(&ctx, NULL, &c->status); if (llen != 0) { screen_write_cursormove(&ctx, 0, yy); ! screen_write_nputs( ! &ctx, llen + 1, &stdgc, utf8flag, "%s ", left); if (larrow) screen_write_putc(&ctx, &stdgc, ' '); } else { --- 166,173 ---- screen_write_start(&ctx, NULL, &c->status); if (llen != 0) { screen_write_cursormove(&ctx, 0, yy); ! screen_write_nputs(&ctx, llen, &stdgc, utf8flag, "%s", left); ! screen_write_putc(&ctx, &stdgc, ' '); if (larrow) screen_write_putc(&ctx, &stdgc, ' '); } else { *************** *** 225,232 **** /* Draw the last item. */ if (rlen != 0) { screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, yy); ! screen_write_nputs( ! &ctx, rlen + 1, &stdgc, utf8flag, " %s", right); } /* Draw the arrows. */ --- 224,231 ---- /* Draw the last item. */ if (rlen != 0) { screen_write_cursormove(&ctx, c->tty.sx - rlen - 1, yy); ! screen_write_putc(&ctx, &stdgc, ' '); ! screen_write_nputs(&ctx, rlen, &stdgc, utf8flag, "%s", right); } /* Draw the arrows. */