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 containts 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.
This commit is contained in:
Nicholas Marriott
2009-08-08 13:29:27 +00:00
parent e89e70e715
commit 5e01b6d663
7 changed files with 111 additions and 123 deletions

4
tty.c
View File

@ -486,8 +486,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;