Article View: comp.editors
Article #3188VI BUG -- 4.2 and 4.3 at least
From: David A. Rabson
Date: Thu, 23 Jun 1988 21:38
Date: Thu, 23 Jun 1988 21:38
44 lines
2031 bytes
2031 bytes
I was asked to make some vi macros to help some new users become adjusted
to UNIX (they wanted to emulate parts of their old editor) and found the
following bug:
The y (yank) command does not always do what is advertised. The following
will demonstrate the problem. In each case, begin with the cursor at the
beginning of the word "three" as shown below.
one two three four
^
command expected effect actual effect
------- --------------- -------------
"ay2fe puts `three' in buffer a; works as expected
does not move cursor
"aye should be exactly the same puts `thre' in buffer
as the first
emab"ay`a should be exactly the same puts `thre' in buffer
as the first two (note
that ` is accent-grave)
So it appears that when yanking with the `e' or ` command, one character fewer
than expected is actually grabbed. It turns out that exactly the same
problem afflicts the E,w, and W commands, but not the f command. I repeated
the problem on three different machines running 4.2 and 4.3.
It is a relief (and confirmation of my bug report) that if y (yank) is
replaced by d (delete) or c (change), there is no problem; everything
works as expected.
Now it would seem that adding a space (or l) after the e in the third
example would be a somewhat kludgy patch, but it still fails at the end
of a line.
Has this bug been reported previously?
David Rabson
davidra@helios.tn.cornell.edu
Laboratory of Atomic and Solid State Physics
Clark Hall, Cornell University
Ithaca, NY 14853-2501
Technical Details
Message-ID:
<5276@batcomputer.tn.cornell.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!ll-xn!mit-eddie!uw-beaver!cornell!batcomputer!davidraShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!ll-xn!mit-eddie!uw-beaver!cornell!batcomputer!davidra From: davidra@batcomputer.tn.cornell.edu (David A. Rabson) Newsgroups: comp.editors Subject: VI BUG -- 4.2 and 4.3 at least Keywords: vi ex bug Message-ID: <5276@batcomputer.tn.cornell.edu> Date: 23 Jun 88 21:38:19 GMT Distribution: comp Organization: Theory Center, Cornell U., Ithaca NY Lines: 44