diff --git a/Changes b/Changes index a63e99f..50b39f4 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +Release ... +* vi no longer dies with a segmentation fault if a line does not fit on the + screen after an insertion. + Release 2/25/05 * Traditional regular expressions can now be used with multibyte characters. * When the 'ignorecase' option is toggled, saved regular expressions are now diff --git a/ex_vadj.c b/ex_vadj.c index 0a5f2ed..0bb62c7 100644 --- a/ex_vadj.c +++ b/ex_vadj.c @@ -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(); diff --git a/ex_version.c b/ex_version.c index cb19944..5f1e6af 100644 --- a/ex_version.c +++ b/ex_version.c @@ -70,12 +70,12 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Sccsid @(#)ex_version.c 1.129 (gritter) 2/25/05 + * Sccsid @(#)ex_version.c 1.130 (gritter) 3/4/05 */ #include "ex.h" -static char *versionstring = "@(#)Version 4.0 (gritter) 2/25/05"; +static char *versionstring = "@(#)Version 4.0 (gritter) 3/4/05"; void printver(void)