diff options
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.118 2009-07-23 12:57:45 tcunha Exp $ */ +/* $Id: tty.c,v 1.119 2009-07-28 22:41:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -490,6 +490,7 @@ void tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy) { const struct grid_cell *gc; + struct grid_cell tmpgc; const struct grid_utf8 *gu; u_int i, sx; @@ -508,8 +509,10 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy) gu = grid_view_peek_utf8(s->grid, i, py); if (screen_check_selection(s, i, py)) { - s->sel.cell.data = gc->data; - tty_cell(tty, &s->sel.cell, gu); + memcpy(&tmpgc, &s->sel.cell, sizeof tmpgc); + tmpgc.data = gc->data; + tmpgc.flags = gc->flags; + tty_cell(tty, &tmpgc, gu); } else tty_cell(tty, gc, gu); } |