=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/grid.c,v retrieving revision 1.87 retrieving revision 1.88 diff -c -r1.87 -r1.88 *** src/usr.bin/tmux/grid.c 2018/10/18 07:57:57 1.87 --- src/usr.bin/tmux/grid.c 2018/10/25 15:13:38 1.88 *************** *** 1,4 **** ! /* $OpenBSD: grid.c,v 1.87 2018/10/18 07:57:57 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: grid.c,v 1.88 2018/10/25 15:13:38 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 418,424 **** grid_empty_line(struct grid *gd, u_int py, u_int bg) { memset(&gd->linedata[py], 0, sizeof gd->linedata[py]); ! if (bg != 8) grid_expand_line(gd, py, gd->sx, bg); } --- 418,424 ---- grid_empty_line(struct grid *gd, u_int py, u_int bg) { memset(&gd->linedata[py], 0, sizeof gd->linedata[py]); ! if (!COLOUR_DEFAULT(bg)) grid_expand_line(gd, py, gd->sx, bg); } *************** *** 524,530 **** void grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) { ! u_int xx, yy; if (nx == 0 || ny == 0) return; --- 524,531 ---- void grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) { ! struct grid_line *gl; ! u_int xx, yy; if (nx == 0 || ny == 0) return; *************** *** 540,551 **** return; for (yy = py; yy < py + ny; yy++) { ! if (px + nx >= gd->sx && px < gd->linedata[yy].cellused) ! gd->linedata[yy].cellused = px; ! if (px > gd->linedata[yy].cellsize && bg == 8) continue; ! if (px + nx >= gd->linedata[yy].cellsize && bg == 8) { ! gd->linedata[yy].cellsize = px; continue; } grid_expand_line(gd, yy, px + nx, 8); /* default bg first */ --- 541,553 ---- return; for (yy = py; yy < py + ny; yy++) { ! gl = &gd->linedata[yy]; ! if (px + nx >= gd->sx && px < gl->cellused) ! gl->cellused = px; ! if (px > gl->cellsize && COLOUR_DEFAULT(bg)) continue; ! if (px + nx >= gl->cellsize && COLOUR_DEFAULT(bg)) { ! gl->cellsize = px; continue; } grid_expand_line(gd, yy, px + nx, 8); /* default bg first */