=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/tmux/screen.c 2009/07/30 20:41:48 1.10 --- src/usr.bin/tmux/screen.c 2009/08/08 13:29:27 1.11 *************** *** 1,4 **** ! /* $OpenBSD: screen.c,v 1.10 2009/07/30 20:41:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen.c,v 1.11 2009/08/08 13:29:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 194,203 **** } /* Resize line arrays. */ ! gd->size = xrealloc(gd->size, gd->hsize + sy, sizeof *gd->size); ! gd->data = xrealloc(gd->data, gd->hsize + sy, sizeof *gd->data); ! gd->usize = xrealloc(gd->usize, gd->hsize + sy, sizeof *gd->usize); ! gd->udata = xrealloc(gd->udata, gd->hsize + sy, sizeof *gd->udata); /* Size increasing. */ if (sy > oldy) { --- 194,201 ---- } /* Resize line arrays. */ ! gd->linedata = xrealloc( ! gd->linedata, gd->hsize + sy, sizeof *gd->linedata); /* Size increasing. */ if (sy > oldy) { *************** *** 218,229 **** needed -= available; /* Then fill the rest in with blanks. */ ! for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++) { ! gd->size[i] = 0; ! gd->data[i] = NULL; ! gd->usize[i] = 0; ! gd->udata[i] = NULL; ! } } /* Set the new size, and reset the scroll region. */ --- 216,223 ---- needed -= available; /* 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. */