vi bug?
Jim Madden
madden at net1.UCSD.EDU
Sat Nov 29 15:52:30 AEST 1986
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') {
More information about the Comp.unix.wizards
mailing list