Subject: Re: Problem /usr/bin/vi in NetBSD-current/i386
To: Bang Jun-Young <bjy@mogua.org>
From: Robert Elz <kre@munnari.OZ.AU>
List: current-users
Date: 10/19/2001 20:47:09
    Date:        Fri, 19 Oct 2001 21:40:55 +0900
    From:        Bang Jun-Young <bjy@mogua.org>
    Message-ID:  <20011019214055.A15098@krishna>

  | It's due to a bug fix made to vi/common/cut.c by aymeric (r1.4). I
  | don't have fix for it for now. :)

Try changing ex/ex_move.c as ...

--- ex/ex_move.c.ORIG	Sat Mar 31 18:37:50 2001
+++ ex/ex_move.c	Fri Oct 19 20:40:25 2001
@@ -56,7 +56,7 @@
 	memset(&cb, 0, sizeof(cb));
 	CIRCLEQ_INIT(&cb.textq);
 	for (cnt = fm1.lno; cnt <= fm2.lno; ++cnt)
-		if (cut_line(sp, cnt, 0, 0, &cb)) {
+		if (cut_line(sp, cnt, 0, -1, &cb)) {
 			rval = 1;
 			goto err;
 		}

Probably it would be better to stick the ENTIRE_LINE define that was
added to cut.c in some header file, and use that, rather than -1, but ...

kre