Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site trsvax Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!convex!trsvax!ron From: ron@trsvax Newsgroups: net.bugs.4bsd Subject: Bug in vi Message-ID: <33500002@trsvax> Date: Wed, 25-Sep-85 15:03:00 EDT Article-I.D.: trsvax.33500002 Posted: Wed Sep 25 15:03:00 1985 Date-Received: Sat, 28-Sep-85 08:31:48 EDT Lines: 32 Nf-ID: #N:trsvax:33500002:000:1146 Nf-From: trsvax!ron Sep 25 14:03:00 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