aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-09 17:28:24 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-09 17:28:24 +0000
commit37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0 (patch)
tree7422f55fe913126e060f60cf8c8d892236bc3dd6 /tty.c
parent5b56ea181649793918779dd2684c671072ce4bc9 (diff)
downloadrtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.tar.gz
rtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.tar.bz2
rtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.zip
Sync OpenBSD patchset 226:
Change the way the grid is stored, previously it was: - a two-dimensional array of cells; - a two-dimensional array of utf8 data; - an array of line lengths. Now it is a single array of a new struct grid_line each of which represents a line and contains the length and an array of cells and an array of utf8 data. This will make it easier to add additional per-line members, such as flags.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index d1b75fb1..95aee805 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.121 2009-08-09 16:50:57 tcunha Exp $ */
+/* $Id: tty.c,v 1.122 2009-08-09 17:28:24 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -496,8 +496,8 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy)
u_int i, sx;
sx = screen_size_x(s);
- if (sx > s->grid->size[s->grid->hsize + py])
- sx = s->grid->size[s->grid->hsize + py];
+ if (sx > s->grid->linedata[s->grid->hsize + py].cellsize)
+ sx = s->grid->linedata[s->grid->hsize + py].cellsize;
if (sx > tty->sx)
sx = tty->sx;