[comp.editors] another vi bug

davidra@batcomputer.tn.cornell.edu (David A. Rabson) (06/25/88)

Yet another vi bug:

Some simple things work fine when entered by hand but not when done with
a map.

A simple map suffering from the ailment is (with all the appropriate
control-V's and with carot-left-bracket replaced by escape):

	map ^[OP "yy$o^["yp

This should yank from the cursor to the end of the line, then open
a new line and put the contents of register y into it.  It doesn't
work.  By stripping stuff off the end, I determined that it likes
everything up to the dollar sign, but doesn't like o or the
"yp  (if I enter the commands manually, there's no problem).

Now things get even stranger.  With the map as printed above, enter
escape-OP (really fast, or use the appropriate function key).  Vi
will open a new line, beep a few times, and leave you in command
mode.  Try to get at the contents of register y: they're not there
(yp beeps).  Worse, if you had anything previously in another register
(say, a), it seems to be gone.  Now do anything that changes the buffer--
the contents of y (and any other register) have mysteriously reappeared.

Does anyone know what's going on here?

			David Rabson
			davidra@helios.tn.cornell.edu
			Laboratory of Atomic and Soild State Physics
			Clark Hall
			Cornell University
			Ithaca, NY 14853-2501