Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!purdue!decwrl!megatest!sudweeks
From: sudweeks@megatest.UUCP (Bruce Sudweeks)
Newsgroups: comp.editors
Subject: global bug in vi
Message-ID: <1039@desert.megatest.UUCP>
Date: 1 Dec 88 18:57:47 GMT
Organization: Megatest Corporation, San Jose, Ca
Lines: 26

I seem to have found a bug in vi. I'm running UCB version 3.7 on a sun 3/50.

The problem occurs when I use global search and destroy type commands. 
Following the command execution, ALL of my buffers get wiped out. For
example: (yank something into a buffer first, then try to retrieve it after-
wards).
	
  #### replace every occurance of pattern with pattern2 until end of file ####

	:.,$g/pattern/s//pattern2/ 
  
  #### replace first occurance of pattern with pattern2 in all files which
	have PATTERN in them ####

	:g/PATTERN/s/pattern/pattern2/

These are just a couple examples. I have tried a number of the global commands
with the same results. Has anyone else seen this bug?

                       -Bruce-
 
       e-mail          { sun, pyramid } sudweeks@megatest 

ps. please don't send me work-a-rounds for the above two examples, In most cases
I have figured out ones myself. I would just like to know if there is a copy
of vi which doesn't exhibit this problem.