[net.bugs] vi bug: "put" and wrapmargin interact

req@warwick.UUCP (Russell Quin) (11/08/85)

On 4.1bsd/vax, 4.2bsd/vax|sun, system III/plexus, system V, etc, with vi
versions 3.1 and later (possibly others)
Description:
When characters appended onto a line using a `put' command cause the length of
the line to exceed (screen width - wrapmargin), vi attempts to break the line
as if it was typed.  If there is no space, everything is fine.
But if the line *would* get wrapped if it were typed by hand (instead of coming
from the "p" command), the following happens:
vi leaves insert mode.  The characters after the break are interpreted as
commands.
Since several of these may alter text, possible on several lines, the undo
command does not always reverse the effect, and in any case usually leaves the
insertion up to and including the break.

Repeat-by:  delete a long line with wm set, then use p
Example:  Enter vi on this file (say).  Move the cursor onto this line.
Type (without the ">>")
>>:se wm=6
>>?But if the
>>fwDp

If you have a terminal wider than 80 cols, you will need to use a number larger
then 6.

I have no fix for this -- but haven't looked very hard.  I haven't seen a fix
on the net before, although we didn't get all of the "4.2 buglist in 10 parts"
that appeared some months ago.
[plea :- please consider our 'phone bill before mailing things from the US.
 It's better to *offer* to send a fix & say how big it is!  If people do send
 me fixes, I will of course post a summary.  We are running 4.1c on a
 vax 11/750]

Help would be very much appreciated!!!
		-Russell
-- 
		... mcvax!ukc!warwick!req  (req@warwick.UUCP)
		... mcvax!ukc!warwick!frplist (frplist@warwick.UUCP)
friend: someone one seems to be able to tolerate at the moment