summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm>2016-10-05 12:36:36 +0000
committernicm <nicm>2016-10-05 12:36:36 +0000
commitf55c991a1b7ec25f03d977cabc7ae4563f37324a (patch)
tree4954bd82f08b9e5f09ef10dad40f68a7786cba30 /screen-write.c
parent4117a7ed1909c16026f63d8469512ffd9fbbf4c9 (diff)
Wrap some long lines in screen-write.c.
Diffstat (limited to 'screen-write.c')
-rw-r--r--screen-write.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/screen-write.c b/screen-write.c
index 2b7fba0b..39775174 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -389,8 +389,8 @@ 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)
+screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px,
+ u_int py, u_int nx, u_int ny)
{
struct screen *s = ctx->s;
struct grid *gd = src->grid;
@@ -1111,7 +1111,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
gce = &gl->celldata[s->cx];
if (gce->flags & GRID_FLAG_EXTENDED)
skip = 0;
- else if (gc->flags != (gce->flags & ~GRID_FLAG_EXTENDED))
+ else if (gc->flags != gce->flags)
skip = 0;
else if (gc->attr != gce->data.attr)
skip = 0;
@@ -1119,7 +1119,9 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
skip = 0;
else if (gc->bg != gce->data.bg)
skip = 0;
- else if (gc->data.width != 1 || gce->data.data != gc->data.data[0])
+ else if (gc->data.width != 1)
+ skip = 0;
+ else if (gce->data.data != gc->data.data[0])
skip = 0;
}
}
@@ -1267,10 +1269,12 @@ screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc,
}
/*
- * Overwrite any padding cells that belong to any UTF-8 characters we'll be
- * overwriting with the current character.
+ * Overwrite any padding cells that belong to any UTF-8 characters
+ * 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;
while (++xx < screen_size_x(s)) {
grid_view_get_cell(gd, xx, s->cy, &tmp_gc);