From minshall@fiberlane.com  Wed Apr 15 00:09:54 1998
Received: from fci1.fiberlane.com (fci1.fiberlane.com [209.31.24.98])
          by hub.freebsd.org (8.8.8/8.8.8) with SMTP id AAA25254
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 1998 00:09:53 GMT
          (envelope-from minshall@fiberlane.com)
Received: from mailhost.fiberlane.com by fci1.fiberlane.com
          via smtpd (for hub.FreeBSD.ORG [204.216.27.18]) with SMTP; 15 Apr 1998 00:05:10 UT
Received: from red.mtv.fiberlane.com by intranet1.fiberlane.com with smtp
	id m0yPFjV-000gypC; Tue, 14 Apr 1998 17:07:21 -0700 (PDT)
Received: by red.mtv.fiberlane.com (8.8.7) id RAA08399; Tue, 14 Apr 1998 17:08:26 -0700 (PDT)
Message-Id: <199804150008.RAA08399@red.mtv.fiberlane.com>
Date: Tue, 14 Apr 1998 17:08:26 -0700 (PDT)
From: minshall@fiberlane.com
Reply-To: minshall@fiberlane.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: vi bug
X-Send-Pr-Version: 3.2

>Number:         6301
>Category:       bin
>Synopsis:       vi ``%'' is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 14 17:10:00 PDT 1998
>Closed-Date:    Fri Apr 17 01:19:16 PDT 1998
>Last-Modified:  Fri Apr 17 01:19:57 PDT 1998
>Originator:     Greg Minshall
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
Fiberlane Communications
>Environment:

	FreeBSD 2.2.5
	vi Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.

>Description:

	#define MASK(len)       ((0xffffffff>>(32-(len)))<<(32-(len)))

	If i position the cursor on the first ``<'' on the above
	line and hit the ``%'' key, the cursor should move to the
	next-to-the-last ``)''.  Instead, it doesn't move (but, it
	beeps at me).

>How-To-Repeat:

	Try it.

>Fix:
>Release-Note:
>Audit-Trail:

From: Bill Fenner <fenner@parc.xerox.com>
To: minshall@fiberlane.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/6301: vi bug 
Date: Tue, 14 Apr 1998 17:45:44 PDT

 It's trying to match your < with a >.  It's beeping to tell you it didn't
 find one.  Bug or feature?  (Certainly doesn't agree with the documentation).
 
   Bill

From: Greg Minshall <minshall@fiberlane.com>
To: Bill Fenner <fenner@parc.xerox.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/6301: vi bug 
Date: Tue, 14 Apr 1998 17:50:32 -0700

 Hey, Bill.
 
 > Bug or feature?
 
 Bug (says the C programmer)!  (Arguably, could have some "set" variable that 
 would enable matching '<' and '>'.)
 
 Greg
 

From: John-Mark Gurney <gurney_j@efn.org>
To: minshall@fiberlane.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/6301: vi bug
Date: Tue, 14 Apr 1998 17:55:16 -0700

 minshall@fiberlane.com scribbled this message on Apr 14:
 > 	#define MASK(len)       ((0xffffffff>>(32-(len)))<<(32-(len)))
 				ab            c   d   dcb  e   f   fea
 
 the letters match what I get when I use % on:
 Version 1.79 (10/23/96) The CSRG, University of California, Berkeley.
 
 on a 2.2.1-R box...
 
 > 	If i position the cursor on the first ``<'' on the above
 
 do you mean `('?  because vi doesn't do matching of angle braces...
 
 > 	line and hit the ``%'' key, the cursor should move to the
 > 	next-to-the-last ``)''.  Instead, it doesn't move (but, it
 > 	beeps at me).
 
 that's because there is no matching char for `<'...
 
 -- 
   John-Mark Gurney                      Modem Rev/FAX: +1 541 346 9237
   Cu Networking					  P.O. Box 5693, 97405
 
   Live in Peace, destroy Micro$oft, support free software, run FreeBSD
 	    Don't trust anyone you don't have the source for

From: Bill Fenner <fenner@parc.xerox.com>
To: John-Mark Gurney <gurney_j@efn.org>
Cc: freebsd-gnats-submit@hub.freebsd.org
Subject: Re: bin/6301: vi bug 
Date: Tue, 14 Apr 1998 21:03:48 PDT

 John-Mark Gurney <gurney_j@efn.org> wrote:
 > > 	#define MASK(len)       ((0xffffffff>>(32-(len)))<<(32-(len)))
 > 				ab            c   d   dcb  e   f   fea
 >
 > > 	If i position the cursor on the first ``<'' on the above
 > 
 > do you mean `('?  because vi doesn't do matching of angle braces...
 
 Yes it does; that's his problem.  Greg wants the behavior that's
 described in the documentation:
 
 	The cursor moves to the parenthesis or curly brace which
 	.i matches
 	the parenthesis or curly brace found at the current cursor position
 	or which is the closest one to the right of the cursor on the line.
 
 Note the last phrase - when Greg has his cursor on the first <, he wants
 it to match on the first paren you labelled "e", since that is the closest
 one to the right of the cursor on the line.  Instead, since vi learned how
 to match <>'s, it beeps since there's no match.
 
 Since matching <>'s is useful when writing HTML but not when programming,
 Greg suggested (in a later message) a "set" option to enable <> matching;
 I think I agree.
 
   Bill
State-Changed-From-To: open->feedback 
State-Changed-By: phk 
State-Changed-When: Wed Apr 15 09:09:52 PDT 1998 
State-Changed-Why:  
I've asked Keith Bostic for his stand on this one. 

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: bin/6301
Date: Fri, 17 Apr 1998 09:44:12 +0200

 In message <199804151944.PAA19836@mongoose.bostic.com>, Keith Bostic writes:
 >> Could you tell us you stand on this nvi issue:
 >>
 >> 	http://www.freebsd.org/cgi/query-pr.cgi?pr=6301
 >
 >I agree with the comment that the % command shouldn't check for
 >< and > matches unless there's an edit option.  Hmmm.  Maybe a
 >
 >	:set match={}<>[]()
 >
 >and you can specify whatever set of matching characters you want?
 >
 >It's a trivial source change to get exact historic behavior, just
 >dike out the:
 >
 >                case '<':
 >                        matchc = '>';
 >                        gc = cs_next;
 >                        break;
 >                case '>':
 >                        matchc = '<';
 >                        gc = cs_prev;
 >                        break;
 >
 >lines in vi/v_match.c.
 >
 >--keith
 >
 >
 >
 
 --
 Poul-Henning Kamp             FreeBSD coreteam member
 phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
 "Drink MONO-tonic, it goes down but it will NEVER come back up!"
State-Changed-From-To: feedback->closed 
State-Changed-By: phk 
State-Changed-When: Fri Apr 17 01:19:16 PDT 1998 
State-Changed-Why:  
Keith has said his bit. 
>Unformatted:
