Date: Thu, 5 Jul 2001 09:58:19 +0800 From: David Xu <bsddiy@163.net> To: Dima Dorfman <dima@unixfreak.org> Cc: freebsd-bugs@FreeBSD.org Subject: Re[2]: bin/28687: dead loop in vi Message-ID: <1054006611.20010705095819@163.net> In-Reply-To: <200107040610.f646A2W78533@freefall.freebsd.org> References: <200107040610.f646A2W78533@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Dima, Wednesday, July 04, 2001, 2:10:02 PM, you wrote: DD> The following reply was made to PR bin/28687; it has been noted by GNATS. DD> From: Dima Dorfman <dima@unixfreak.org> DD> To: David Xu <davidx@viasoft.com.cn> DD> Cc: freebsd-gnats-submit@FreeBSD.org DD> Subject: Re: bin/28687: dead loop in vi DD> Date: Tue, 03 Jul 2001 23:01:35 -0700 DD> David Xu <davidx@viasoft.com.cn> writes: DD> > >How-To-Repeat: DD> > $vi DD> > :set leftright DD> > :set number DD> Try this patch please: DD> Index: vs_refresh.c DD> =================================================================== DD> RCS file: /stl/src/FreeBSD/src/contrib/nvi/vi/vs_refresh.c,v DD> retrieving revision 1.2 DD> diff -u -r1.2 vs_refresh.c DD> --- vs_refresh.c 1998/08/02 15:18:44 1.2 DD> +++ vs_refresh.c 2001/07/04 05:59:57 DD> @@ -595,7 +595,7 @@ DD> * for the number option offset. DD> */ DD> cnt = vs_columns(sp, NULL, LNO, &CNO, NULL); DD> - if (O_ISSET(sp, O_NUMBER)) DD> + if (O_ISSET(sp, O_NUMBER) && cnt >= O_NUMBER_LENGTH) DD> cnt -= O_NUMBER_LENGTH; DD> /* Adjust the window towards the beginning of the line. */ Problem disappeared. -- Thanks, David Xu 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?1054006611.20010705095819>