X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/af93b5dd0d7550c7a0e379e6d6f4cd972bc00dc8..04379bab9fd28b15a61df6d0d2ae55608c992385:/usr/src/usr.bin/ex/ex_vops.c diff --git a/usr/src/usr.bin/ex/ex_vops.c b/usr/src/usr.bin/ex/ex_vops.c index 64e1a5d311..ea62f31b3c 100644 --- a/usr/src/usr.bin/ex/ex_vops.c +++ b/usr/src/usr.bin/ex/ex_vops.c @@ -1,5 +1,5 @@ /* Copyright (c) 1980 Regents of the University of California */ -static char *sccsid = "@(#)ex_vops.c 5.1 %G%"; +static char *sccsid = "@(#)ex_vops.c 6.1 %G%"; #include "ex.h" #include "ex_tty.h" #include "ex_vis.h" @@ -173,6 +173,7 @@ bool fromvis; { line *savedot, *savedol; char *savecursor; + char savelb[LBSIZE]; int nlines, more; register line *a1, *a2; char ch; /* DEBUG */ @@ -202,6 +203,7 @@ bool fromvis; vudump("before vmacchng hairy case"); #endif savedot = dot; savedol = dol; savecursor = cursor; + CP(savelb, linebuf); nlines = dol - zero; while ((line *) endcore - truedol < nlines) morelines(); @@ -228,11 +230,12 @@ bool fromvis; more = savedol - dol; /* amount we shift everything by */ if (more) (*(more>0 ? copywR : copyw))(savedol+1, dol+1, truedol-dol); - unddol += more; truedol += more; + unddol += more; truedol += more; undap2 += more; truedol -= nlines; copyw(zero+1, truedol+1, nlines); dot = savedot; dol = savedol ; cursor = savecursor; + CP(linebuf, savelb); vch_mac = VC_MANYCHANGE; /* Arrange that no further undo saving happens within macro */