Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2001 23:10:02 -0700 (PDT)
From:      Dima Dorfman <dima@unixfreak.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/28687: dead loop in vi 
Message-ID:  <200107040610.f646A2W78533@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/28687; it has been noted by GNATS.

From: Dima Dorfman <dima@unixfreak.org>
To: David Xu <davidx@viasoft.com.cn>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/28687: dead loop in vi 
Date: Tue, 03 Jul 2001 23:01:35 -0700

 David Xu <davidx@viasoft.com.cn> writes:
 > >How-To-Repeat:
 > $vi
 > :set leftright
 > :set number
 
 Try this patch please:
 
 Index: vs_refresh.c
 ===================================================================
 RCS file: /stl/src/FreeBSD/src/contrib/nvi/vi/vs_refresh.c,v
 retrieving revision 1.2
 diff -u -r1.2 vs_refresh.c
 --- vs_refresh.c	1998/08/02 15:18:44	1.2
 +++ vs_refresh.c	2001/07/04 05:59:57
 @@ -595,7 +595,7 @@
  		 * 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. */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107040610.f646A2W78533>