=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.34 retrieving revision 1.35 diff -c -r1.34 -r1.35 *** src/usr.bin/tmux/tty.c 2009/09/23 12:03:31 1.34 --- src/usr.bin/tmux/tty.c 2009/10/09 07:23:28 1.35 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.34 2009/09/23 12:03:31 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.35 2009/10/09 07:23:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 524,529 **** --- 524,531 ---- const struct grid_utf8 *gu; u_int i, sx; + tty_update_mode(tty, tty->mode & ~MODE_CURSOR); + sx = screen_size_x(s); if (sx > s->grid->linedata[s->grid->hsize + py].cellsize) sx = s->grid->linedata[s->grid->hsize + py].cellsize; *************** *** 548,555 **** tty_cell(tty, gc, gu); } ! if (sx >= tty->sx) return; tty_reset(tty); tty_cursor(tty, sx, py, ox, oy); --- 550,559 ---- tty_cell(tty, gc, gu); } ! if (sx >= tty->sx) { ! tty_update_mode(tty, tty->mode); return; + } tty_reset(tty); tty_cursor(tty, sx, py, ox, oy); *************** *** 559,564 **** --- 563,569 ---- for (i = sx; i < screen_size_x(s); i++) tty_putc(tty, ' '); } + tty_update_mode(tty, tty->mode); } void *************** *** 587,593 **** if (c->session->curw->window == wp->window) { if (c->tty.flags & TTY_FREEZE || c->tty.term == NULL) continue; - tty_update_mode(&c->tty, c->tty.mode & ~MODE_CURSOR); cmdfn(&c->tty, ctx); } } --- 592,597 ----