diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-01-29 12:01:16 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-01-29 12:01:16 +0000 |
commit | 8cf1504ba67307ee885c19c12d63a6a22016a582 (patch) | |
tree | 168042ba3854675033e003e06452cc58869c8eb1 /grid.c | |
parent | 1d6bd50343f4395879169868e47bb59f5b2f3811 (diff) | |
parent | 427b8204268af5548d09b830e101c59daa095df9 (diff) | |
download | rtmux-8cf1504ba67307ee885c19c12d63a6a22016a582.tar.gz rtmux-8cf1504ba67307ee885c19c12d63a6a22016a582.tar.bz2 rtmux-8cf1504ba67307ee885c19c12d63a6a22016a582.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'grid.c')
-rw-r--r-- | grid.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -37,7 +37,7 @@ /* Default grid cell data. */ const struct grid_cell grid_default_cell = { - 0, 0, 8, 8, { { ' ' }, 0, 1, 1 } + 0, 0, { .fg = 8 }, { .bg = 8 }, { { ' ' }, 0, 1, 1 } }; const struct grid_cell_entry grid_default_entry = { 0, { .data = { 0, 8, 8, ' ' } } @@ -284,6 +284,7 @@ grid_set_cell(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc) struct grid_line *gl; struct grid_cell_entry *gce; struct grid_cell *gcp; + int extended; if (grid_check_y(gd, py) != 0) return; @@ -293,8 +294,12 @@ grid_set_cell(struct grid *gd, u_int px, u_int py, const struct grid_cell *gc) gl = &gd->linedata[py]; gce = &gl->celldata[px]; - if ((gce->flags & GRID_FLAG_EXTENDED) || gc->data.size != 1 || - gc->data.width != 1) { + extended = (gce->flags & GRID_FLAG_EXTENDED); + if (!extended && (gc->data.size != 1 || gc->data.width != 1)) + extended = 1; + if (!extended && (gc->flags & (GRID_FLAG_FGRGB|GRID_FLAG_BGRGB))) + extended = 1; + if (extended) { if (~gce->flags & GRID_FLAG_EXTENDED) { gl->extddata = xreallocarray(gl->extddata, gl->extdsize + 1, sizeof *gl->extddata); |