2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
9 static char sccsid
[] = "$Id: ex_undo.c,v 8.3 1993/12/29 09:50:58 bostic Exp $ (Berkeley) $Date: 1993/12/29 09:50:58 $";
12 #include <sys/types.h>
19 * Undo changes to this line.
22 ex_undol(sp
, ep
, cmdp
)
27 if (log_setline(sp
, ep
))
36 * Undo the last change.
48 * Multiple undo isn't available in ex, as there's no '.' command.
49 * Whether 'u' is undo or redo is toggled each time, unless there
50 * was a change since the last undo, in which case it's an undo.
52 if (!F_ISSET(ep
, F_UNDO
)) {
58 if (log_forward(sp
, ep
, &m
))
63 if (log_backward(sp
, ep
, &m
))