=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/usr.bin/tmux/tty.c 2009/10/10 10:36:46 1.37 --- src/usr.bin/tmux/tty.c 2009/10/11 22:35:10 1.38 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.37 2009/10/10 10:36:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.38 2009/10/11 22:35:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 462,469 **** if (screen_check_selection(s, i, py)) { memcpy(&tmpgc, &s->sel.cell, sizeof tmpgc); tmpgc.data = gc->data; ! tmpgc.flags = gc->flags & ~(GRID_FLAG_FG256|GRID_FLAG_BG256); ! tmpgc.flags |= s->sel.cell.flags & (GRID_FLAG_FG256|GRID_FLAG_BG256); tty_cell(tty, &tmpgc, gu); } else tty_cell(tty, gc, gu); --- 462,471 ---- if (screen_check_selection(s, i, py)) { memcpy(&tmpgc, &s->sel.cell, sizeof tmpgc); tmpgc.data = gc->data; ! tmpgc.flags = gc->flags & ! ~(GRID_FLAG_FG256|GRID_FLAG_BG256); ! tmpgc.flags |= s->sel.cell.flags & ! (GRID_FLAG_FG256|GRID_FLAG_BG256); tty_cell(tty, &tmpgc, gu); } else tty_cell(tty, gc, gu); *************** *** 671,681 **** return; } - tty_reset(tty); - - tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); - if (ctx->ocy == ctx->orupper) { tty_cursor(tty, ctx->ocx, ctx->orupper, wp->xoff, wp->yoff); tty_putcode(tty, TTYC_RI); } --- 673,681 ---- return; } if (ctx->ocy == ctx->orupper) { + tty_reset(tty); + tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); tty_cursor(tty, ctx->ocx, ctx->orupper, wp->xoff, wp->yoff); tty_putcode(tty, TTYC_RI); } *************** *** 692,698 **** tty_redraw_region(tty, ctx); return; } - if (ctx->ocy == ctx->orlower) { tty_reset(tty); --- 692,697 ----