[comp.unix.questions] CTRL-@ in insert mode hangs vi

walter@mecky.UUCP (Walter Mecky) (07/08/90)

According to FM, you can you use CTRL-@ in insert mode very well:

	  Ctrl-@    If entered as the first character of an insertion,
		    it is replaced with	the last text inserted,	and
		    the	insertion terminates.  Only 128	characters are
		    saved from the last	insertion.  If more than 128
		    characters were inserted, then this	command
		    inserts no characters.  A Ctrl-@ cannot be part of
		    a file, even if quoted.

If I do this, vi hangs and nothing awakens him, including interrupt and
quit key. Worse is, that I cannot kill vi from another terminal execpt
with signal as 9 ==> vi can't write to the recovery file and the editing
work is gone :-(

My system is SCO UNIX 3.2.0. Anybody's vi has this bug too ?
-- 
Walter Mecky	[ walter@mecky	or  ...uunet!unido!mecky!walter ]

walter@mecky.UUCP (Walter Mecky) (07/10/90)

In article <681@mecky.UUCP> I write:
about vi hanging after I pressed CTRL-@. I was rather stupid,
because the problem was not in vi but in my terminal driver,
which interpreted CTRL-@ as the "suspend" character (thank you
Roger for the email).

My only excuse is the absence of any reference in the manual about
the suspend character: in stty(C) SCO mentions it, but doesn't
explain it, nothing in termio(M). Probably it's the first step 
to job control, but at present, the behaviour is rather strange: 
If I type the suspend character in the login shell, I logout. 
In a subshell, I become blocked as in vi. Only the input echo is 
activ.

My advice to users of SCO UNIX (and to SCO until job controls works):
Disable the suspend char in /etc/profile with stty susp '^-'.
-- 
Walter Mecky	[ walter@mecky	or  ...uunet!unido!mecky!walter ]