From 9b37f1ed84893cfd09269a7b8548b6b72fa797c5 Mon Sep 17 00:00:00 2001 From: bostic Date: Thu, 23 Dec 1993 17:42:05 +0000 Subject: [PATCH] cols_per_screen wasn't set right if about to step through a line to a seccond or subsequent screen --- vi/vs_line.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vi/vs_line.c b/vi/vs_line.c index 158289f0..b3d1a169 100644 --- a/vi/vs_line.c +++ b/vi/vs_line.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "$Id: vs_line.c,v 8.15 1993/12/02 18:11:13 bostic Exp $ (Berkeley) $Date: 1993/12/02 18:11:13 $"; +static char sccsid[] = "$Id: vs_line.c,v 8.16 1993/12/23 17:42:05 bostic Exp $ (Berkeley) $Date: 1993/12/23 17:42:05 $"; #endif /* not lint */ #include @@ -109,12 +109,13 @@ svi_line(sp, ep, smp, yp, xp) * and this is the first screen of a folding line or any left- * right line, display the line number. */ - if (O_ISSET(sp, O_NUMBER) && - (smp->lno == 1 || p != NULL) && skip_screens == 0) { + if (O_ISSET(sp, O_NUMBER)) { cols_per_screen -= O_NUMBER_LENGTH; - (void)snprintf(nbuf, - sizeof(nbuf), O_NUMBER_FMT, smp->lno); - ADDSTR(nbuf); + if ((smp->lno == 1 || p != NULL) && skip_screens == 0) { + (void)snprintf(nbuf, + sizeof(nbuf), O_NUMBER_FMT, smp->lno); + ADDSTR(nbuf); + } } } -- 2.11.4.GIT