=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/display.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- src/usr.bin/mg/display.c 2002/03/16 04:17:36 1.12 +++ src/usr.bin/mg/display.c 2002/03/27 17:42:37 1.13 @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.12 2002/03/16 04:17:36 vincent Exp $ */ +/* $OpenBSD: display.c,v 1.13 2002/03/27 17:42:37 millert Exp $ */ /* * The functions in this file handle redisplay. The @@ -629,11 +629,15 @@ LINE *lp; /* pointer to current line */ int j; /* index into line */ + if (ncol < 2) + return; + /* * calculate what column the left bound should be * (force cursor into middle half of screen) */ lbound = curcol - (curcol % (ncol >> 1)) - (ncol >> 2); + /* * scan through the line outputing characters to the virtual screen * once we reach the left edge