diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-14 21:32:38 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-14 21:32:38 +0000 |
commit | 78c789e1cb24315f4c88af45ec476ccad0ef23c3 (patch) | |
tree | 25669a69e1f7d165b8324b8ca354109da240daa0 /screen-write.c | |
parent | b5059bc8a48496f5650a03d18980014b552831eb (diff) | |
download | rtmux-78c789e1cb24315f4c88af45ec476ccad0ef23c3.tar.gz rtmux-78c789e1cb24315f4c88af45ec476ccad0ef23c3.tar.bz2 rtmux-78c789e1cb24315f4c88af45ec476ccad0ef23c3.zip |
Sync OpenBSD patchset 252:
It was originally intended that scroll mode would show content that was
currently off-screen due to resize, but somewhere along the way this got
lost. Restore this behaviour to scroll mode by fixing screen_write_copy to read
up to the saved line length rather than the current screen width. Copy mode
remains unaltered for now.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/screen-write.c b/screen-write.c index aa4abf2f..bdb624a1 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1,4 +1,4 @@ -/* $Id: screen-write.c,v 1.67 2009-08-09 17:32:06 tcunha Exp $ */ +/* $Id: screen-write.c,v 1.68 2009-08-14 21:32:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -184,24 +184,24 @@ screen_write_copy(struct screen_write_ctx *ctx, { struct screen *s = ctx->s; struct grid *gd = src->grid; + struct grid_line *gl; const struct grid_cell *gc; - struct grid_utf8 *gu; u_char *udata; u_int xx, yy, cx, cy; cx = s->cx; cy = s->cy; for (yy = py; yy < py + ny; yy++) { + gl = &gd->linedata[yy]; for (xx = px; xx < px + nx; xx++) { - if (xx >= gd->sx || yy >= gd->hsize + gd->sy) - gc = &grid_default_cell; - else - gc = grid_peek_cell(gd, xx, yy); + udata = NULL; - udata = NULL; - if (gc->flags & GRID_FLAG_UTF8) { - gu = grid_get_utf8(gd, xx, yy); - udata = gu->data; + if (xx >= gl->cellsize || yy >= gd->hsize + gd->sy) + gc = &grid_default_cell; + else { + gc = &gl->celldata[xx]; + if (gc->flags & GRID_FLAG_UTF8) + udata = gl->utf8data[xx].data; } screen_write_cell(ctx, gc, udata); |