Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!styx!ames!ucbcad!ucbvax!sdcsvax!net1!madden From: madden@net1.UCSD.EDU (Jim Madden) Newsgroups: comp.unix.wizards Subject: Re: vi bug? Message-ID: <322@net1.UCSD.EDU> Date: Sat, 29-Nov-86 00:52:30 EST Article-I.D.: net1.322 Posted: Sat Nov 29 00:52:30 1986 Date-Received: Sat, 29-Nov-86 07:09:36 EST References: <939@brl-adm.ARPA> <7157@boring.mcvax.UUCP> Reply-To: madden@sdcsvax.UUCP (Jim Madden) Organization: U.C. San Diego Lines: 70 Summary: Bandaid repair for wrapmargin bug. Here's a patch to the 3.7 version of vi that prevents the peculiar situation in which text which wraps around the end of a line during a "put" is interpreted as commands: *** /tmp/,RCSt1017647 Fri Nov 28 21:49:00 1986 --- ex_vops2.c Wed Dec 18 12:47:03 1985 *************** *** 1,5 /* Copyright (c) 1981 Regents of the University of California */ static char *sccsid = "@(#)ex_vops2.c 6.5 7/26/81"; #include "ex.h" #include "ex_tty.h" #include "ex_vis.h" --- 1,8 ----- /* Copyright (c) 1981 Regents of the University of California */ static char *sccsid = "@(#)ex_vops2.c 6.5 7/26/81"; + + /* $Header: ex_vops2.c,v 1.2 83/11/01 14:34:01 muller Exp $ */ + #include "ex.h" #include "ex_tty.h" #include "ex_vis.h" *************** *** 4,9 #include "ex_tty.h" #include "ex_vis.h" /* * Low level routines for operations sequences, * and mostly, insert mode (and a subroutine --- 7,19 ----- #include "ex_tty.h" #include "ex_vis.h" + /* $Log: ex_vops2.c,v $ + * Revision 1.2 83/11/01 14:34:01 muller + * Kludge patch to let puts that generate long lines operate on terminals + * with wrapmargin set and screen insert mode (h19s). Such puts will cause + * random text changes without the patch. + * */ + /* * Low level routines for operations sequences, * and mostly, insert mode (and a subroutine *************** *** 621,627 gobbled = 1; continue; } ! if (value(WRAPMARGIN) && (outcol >= OCOLUMNS - value(WRAPMARGIN) || backsl && outcol==0) && commch != 'r') { --- 631,642 ----- gobbled = 1; continue; } ! if (value(WRAPMARGIN) && !vglobp && ! /* ! * vglopb implies this is not really a keyboard ! * text insert. This test avoids trying to ! * split lines at the wrapmargin for puts. ! */ (outcol >= OCOLUMNS - value(WRAPMARGIN) || backsl && outcol==0) && commch != 'r') {