diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-01-05 10:01:11 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-01-05 10:01:11 +0000 |
commit | 58642011df2ccb02d405626e641ad9f11945a276 (patch) | |
tree | 68e7775da8a888e271ba22ab11dcbce7d60b28e1 /screen-write.c | |
parent | 45dbbb78b0f8865475ef262d45465f3faafd3500 (diff) | |
parent | 9a56671a7565322142b9871c5fe1d945ce200b9a (diff) | |
download | rtmux-58642011df2ccb02d405626e641ad9f11945a276.tar.gz rtmux-58642011df2ccb02d405626e641ad9f11945a276.tar.bz2 rtmux-58642011df2ccb02d405626e641ad9f11945a276.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/screen-write.c b/screen-write.c index e8593cf1..0fe23df8 100644 --- a/screen-write.c +++ b/screen-write.c @@ -392,12 +392,13 @@ screen_write_cnputs(struct screen_write_ctx *ctx, ssize_t maxlen, /* Copy from another screen. */ void screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px, - u_int py, u_int nx, u_int ny) + u_int py, u_int nx, u_int ny, bitstr_t *markbs, + const struct grid_cell *markgc) { struct screen *s = ctx->s; struct grid *gd = src->grid; struct grid_cell gc; - u_int xx, yy, cx, cy; + u_int xx, yy, cx, cy, b; cx = s->cx; cy = s->cy; @@ -405,6 +406,14 @@ screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px, for (yy = py; yy < py + ny; yy++) { for (xx = px; xx < px + nx; xx++) { grid_get_cell(gd, xx, yy, &gc); + if (markbs != NULL) { + b = (yy * screen_size_x(src)) + xx; + if (bit_test(markbs, b)) { + gc.attr = markgc->attr; + gc.fg = markgc->fg; + gc.bg = markgc->bg; + } + } screen_write_cell(ctx, &gc); } |