diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-05 12:36:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-10-05 12:36:37 +0000 |
commit | f3a4d0306de3f83a21b7dc63687879e660cb1871 (patch) | |
tree | aa38cfe346df70c0285d5c0194fd54ef49d21e43 /usr.bin/tmux/screen-write.c | |
parent | 0b373c33f2495a9b394c3a5ef95b2e6e97aa4572 (diff) |
Wrap some long lines in screen-write.c.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 37c22d0b01a..b604271e35e 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.94 2016/09/29 08:50:43 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.95 2016/10/05 12:36:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |