Add accessors for grid linedata member, for some future work. From Dan

Aloni.
This commit is contained in:
nicm
2018-07-04 09:44:07 +00:00
parent 42935bde71
commit 2fae6a5761
8 changed files with 43 additions and 24 deletions

View File

@ -281,9 +281,8 @@ screen_resize_y(struct screen *s, u_int sy)
s->cy -= needed;
}
/* Resize line arrays. */
gd->linedata = xreallocarray(gd->linedata, gd->hsize + sy,
sizeof *gd->linedata);
/* Resize line array. */
grid_adjust_lines(gd, gd->hsize + sy);
/* Size increasing. */
if (sy > oldy) {
@ -306,7 +305,7 @@ screen_resize_y(struct screen *s, u_int sy)
/* Then fill the rest in with blanks. */
for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++)
memset(&gd->linedata[i], 0, sizeof gd->linedata[i]);
memset(grid_get_line(gd, i), 0, sizeof(struct grid_line));
}
/* Set the new size, and reset the scroll region. */