* vi no longer dies with a segmentation fault if a line does not fit on the

screen after an insertion.
This commit is contained in:
Gunnar Ritter
2005-03-04 12:22:53 +00:00
parent 451eeb404b
commit be3347f5be
3 changed files with 9 additions and 3 deletions

View File

@@ -73,7 +73,7 @@
#ifndef lint
#ifdef DOSCCS
static char sccsid[] = "@(#)ex_vadj.c 1.10 (gritter) 11/23/04";
static char sccsid[] = "@(#)ex_vadj.c 1.11 (gritter) 3/4/05";
#endif
#endif
@@ -167,6 +167,8 @@ vreopen(int p, int lineno, int l)
register int d;
register struct vlinfo *vp = &vlinfo[l];
if (p < 0)
error("Line too long to fit on screen");
d = vp->vdepth;
if (d == 0 || (vp->vflags & VDIRT))
vp->vdepth = d = vdepth();