summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/nvi/vi/vs_refresh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/nvi/vi/vs_refresh.c b/contrib/nvi/vi/vs_refresh.c
index d954c62..f69d382 100644
--- a/contrib/nvi/vi/vs_refresh.c
+++ b/contrib/nvi/vi/vs_refresh.c
@@ -10,7 +10,11 @@
#include "config.h"
#ifndef lint
+#if 0
static const char sccsid[] = "@(#)vs_refresh.c 10.44 (Berkeley) 10/13/96";
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint */
#include <sys/types.h>
@@ -595,7 +599,7 @@ slow: for (smp = HMAP; smp->lno != LNO; ++smp);
* for the number option offset.
*/
cnt = vs_columns(sp, NULL, LNO, &CNO, NULL);
- if (O_ISSET(sp, O_NUMBER))
+ if (O_ISSET(sp, O_NUMBER) && cnt >= O_NUMBER_LENGTH)
cnt -= O_NUMBER_LENGTH;
/* Adjust the window towards the beginning of the line. */
OpenPOWER on IntegriCloud