=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen.c,v retrieving revision 1.50 retrieving revision 1.51 diff -c -r1.50 -r1.51 *** src/usr.bin/tmux/screen.c 2017/11/15 19:21:24 1.50 --- src/usr.bin/tmux/screen.c 2018/07/04 09:44:07 1.51 *************** *** 1,4 **** ! /* $OpenBSD: screen.c,v 1.50 2017/11/15 19:21:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen.c,v 1.51 2018/07/04 09:44:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 281,289 **** s->cy -= needed; } ! /* Resize line arrays. */ ! gd->linedata = xreallocarray(gd->linedata, gd->hsize + sy, ! sizeof *gd->linedata); /* Size increasing. */ if (sy > oldy) { --- 281,288 ---- s->cy -= needed; } ! /* Resize line array. */ ! grid_adjust_lines(gd, gd->hsize + sy); /* Size increasing. */ if (sy > oldy) { *************** *** 306,312 **** /* 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]); } /* Set the new size, and reset the scroll region. */ --- 305,311 ---- /* Then fill the rest in with blanks. */ for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++) ! memset(grid_get_line(gd, i), 0, sizeof(struct grid_line)); } /* Set the new size, and reset the scroll region. */