=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/undo.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- src/usr.bin/mg/undo.c 2010/06/30 19:12:54 1.50 +++ src/usr.bin/mg/undo.c 2012/11/06 18:04:10 1.51 @@ -1,4 +1,4 @@ -/* $OpenBSD: undo.c,v 1.50 2010/06/30 19:12:54 oga Exp $ */ +/* $OpenBSD: undo.c,v 1.51 2012/11/06 18:04:10 florian Exp $ */ /* * This file is in the public domain */ @@ -464,15 +464,13 @@ struct undo_rec *ptr, *nptr; int done, rval; struct line *lp; - int offset, save, dot; + int offset, save; static int nulled = FALSE; int lineno; if (n < 0) return (FALSE); - dot = find_dot(curwp->w_dotp, curwp->w_doto); - ptr = curbp->b_undoptr; /* first invocation, make ptr point back to the top of the list */ @@ -573,13 +571,8 @@ ewprintf("Undo!"); } - /* - * Record where we are. (we have to save our new position at the end - * since we change the dot when undoing....) - */ - curbp->b_undoptr = ptr; - curbp->b_undopos = find_dot(curwp->w_dotp, curwp->w_doto); + curbp->b_undoptr = ptr; return (rval); }