mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Add accessors for grid linedata member, for some future work. From Dan
Aloni.
This commit is contained in:
7
screen.c
7
screen.c
@ -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. */
|
||||
|
Reference in New Issue
Block a user