[comp.os.vms] TPUVI Bug

VAUGHAN@CANISIUS.BITNET (Tom Vaughan @ Computer Center) (10/20/87)

 I have put up TPU-VI and have encountered a problem:

   using the global substitution command
                 :g/targetstring/s//replace string/g

The VI editor goes into an infinite tail spin giving me
that "Line Length at Maximum, Can't Insert Characters" type of message.
You can't break out with ctrl-y or ctrl-c,  luckily we are on a PBX
and can disconnect.

Has anyone had this problem, or is this because it was munged over usenet?

I have tied to send a message to Greg Wonderly, but it was rejected..so
I doubt it got to him.

Any help with this would be appreciated!  Our CS dept wants to use it.

BITNET : vaughan@canisius                CSNET  :  vaughan%canisius@CSNET-relay
UUCP   : ..!{ames,boulder,decvax,rutgers}!sunybcs!canisius!vaughan
US MAIL:  Thomas Vaughan/ Computer Center / Canisius College/
          2001 Main St./ Buffalo N.Y. 14208

gregg@a.cs.okstate.edu (Gregg Wonderly) (10/21/87)

in article <8710201014.AA04165@ucbvax.Berkeley.EDU>, VAUGHAN@CANISIUS.BITNET (Tom Vaughan @ Computer Center) says:
> 
>  I have put up TPU-VI and have encountered a problem:
> 
>    using the global substitution command
>                  :g/targetstring/s//replace string/g
> 
> The VI editor goes into an infinite tail spin giving me
> that "Line Length at Maximum, Can't Insert Characters" type of message.
> You can't break out with ctrl-y or ctrl-c,  luckily we are on a PBX
> and can disconnect.
> 

    You are the second person that I have heard of that uses

       :g/targetstring/s//replace string/g

as opposed to the more obvious

       :%s/targetstring/replace string/g

TPU VI is not attempting to use any special techniques here for determining
that the source string of the 's' command is null, so it should use the
string from the global command.

The global command only identifies a line to act on.  The substitute command
is then applied to that line.  What you are experiencing is TPU always matching
a null pattern, and then inserting the 'replace string', thus lengthening the
line forever.

The simple workaround is to use the second notation given above.

I have made TPU VI compatible with this notation, but it was not obvious
to me that it should have worked that way.

-----
Gregg Wonderly
Department of Mathematics
Oklahoma State University

UUCP:  {cbosgd, ihnp4, rutgers}!okstate!nemo.math.okstate.edu!gregg
ARPA:  gregg@NEMO.MATH.OKSTATE.EDU