Bug in vi
    ron at trsvax 
    ron at trsvax
       
    Thu Sep 26 05:03:00 AEST 1985
    
    
  
Subject: bug in 3.6 vi (probably 3.7 also)
Description:
	Vi has a bug in it when the ^^ (control ^) command is used if the
    current file has been modified and there was no previous file edited
    and vi set for autowrite.
    On most terminals, the ^^ key is a deliberate action of the control
    key and the ^ key.  On others, this key may be labeled something
    like 'f6' which might get hit accidently.
    When, under the above circumstances, this key is hit, the current file
    will be written out, the error message of "No filename substitute for #"
    will be displayed, then the last line of the file will REPLACE the current
    line the cursor is on.  If at this point the ^^ key is accidently hit
    again, the file, now with a bogus line, will be written out again.
Repeat-By:
	% vi dont-care
	:set aw			(set autowrite)
	(position the cursor to any line in the file)
	dd			(delete a line)
	P			(put it back)
	^^
Fix:
	Unknown. (but PLEASE don't tell me the answer is NOT to use
	autowrite. That's like saying "if one of your headlights doesn't
	work properly, don't use them")
	{microsoft,ctvax}!trsvax!ron
	Ron Light
    
    
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list