diff --git a/screen-write.c b/screen-write.c index a0c28575..6b6aa400 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1035,8 +1035,10 @@ screen_write_cell( if (screen_check_selection(s, s->cx - width, s->cy)) { memcpy(&tmp_gc2, &s->sel.cell, sizeof tmp_gc2); tmp_gc2.data = gc->data; - tmp_gc2.flags = gc->flags & ~(GRID_FLAG_FG256|GRID_FLAG_BG256); - tmp_gc2.flags |= s->sel.cell.flags & (GRID_FLAG_FG256|GRID_FLAG_BG256); + tmp_gc2.flags = gc->flags & + ~(GRID_FLAG_FG256|GRID_FLAG_BG256); + tmp_gc2.flags |= s->sel.cell.flags & + (GRID_FLAG_FG256|GRID_FLAG_BG256); ttyctx.cell = &tmp_gc2; tty_write(tty_cmd_cell, &ttyctx); } else {