version 1.94, 2016/09/29 08:50:43 |
version 1.95, 2016/10/05 12:36:36 |
|
|
|
|
/* Copy from another screen. */ |
/* Copy from another screen. */ |
void |
void |
screen_write_copy(struct screen_write_ctx *ctx, |
screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px, |
struct screen *src, u_int px, u_int py, u_int nx, u_int ny) |
u_int py, u_int nx, u_int ny) |
{ |
{ |
struct screen *s = ctx->s; |
struct screen *s = ctx->s; |
struct grid *gd = src->grid; |
struct grid *gd = src->grid; |
|
|
gce = &gl->celldata[s->cx]; |
gce = &gl->celldata[s->cx]; |
if (gce->flags & GRID_FLAG_EXTENDED) |
if (gce->flags & GRID_FLAG_EXTENDED) |
skip = 0; |
skip = 0; |
else if (gc->flags != (gce->flags & ~GRID_FLAG_EXTENDED)) |
else if (gc->flags != gce->flags) |
skip = 0; |
skip = 0; |
else if (gc->attr != gce->data.attr) |
else if (gc->attr != gce->data.attr) |
skip = 0; |
skip = 0; |
|
|
skip = 0; |
skip = 0; |
else if (gc->bg != gce->data.bg) |
else if (gc->bg != gce->data.bg) |
skip = 0; |
skip = 0; |
else if (gc->data.width != 1 || gce->data.data != gc->data.data[0]) |
else if (gc->data.width != 1) |
skip = 0; |
skip = 0; |
|
else if (gce->data.data != gc->data.data[0]) |
|
skip = 0; |
} |
} |
} |
} |
|
|
|
|
} |
} |
|
|
/* |
/* |
* Overwrite any padding cells that belong to any UTF-8 characters we'll be |
* Overwrite any padding cells that belong to any UTF-8 characters |
* overwriting with the current character. |
* we'll be overwriting with the current character. |
*/ |
*/ |
if (width != 1 || gc->data.width != 1 || gc->flags & GRID_FLAG_PADDING) { |
if (width != 1 || |
|
gc->data.width != 1 || |
|
gc->flags & GRID_FLAG_PADDING) { |
xx = s->cx + width - 1; |
xx = s->cx + width - 1; |
while (++xx < screen_size_x(s)) { |
while (++xx < screen_size_x(s)) { |
grid_view_get_cell(gd, xx, s->cy, &tmp_gc); |
grid_view_get_cell(gd, xx, s->cy, &tmp_gc); |