From def28a15b68d38a1eb9a6d35af467ec7d5b317df Mon Sep 17 00:00:00 2001 From: Eddy De Greef Date: Thu, 7 Oct 2004 08:27:49 +0000 Subject: [PATCH] Fix for SF bug #988220: backup file?. The backup file was not removed when a redo operation returned the document to the state where it matches the saved file. Closing the document then left behind the backup file. --- source/undo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/undo.c b/source/undo.c index 571c6e5..cbba89d 100644 --- a/source/undo.c +++ b/source/undo.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: undo.c,v 1.17 2004/07/21 11:32:06 yooden Exp $"; +static const char CVSID[] = "$Id: undo.c,v 1.18 2004/10/07 08:27:49 edg Exp $"; /******************************************************************************* * * * undo.c -- Nirvana Editor undo command * @@ -161,9 +161,13 @@ void Redo(WindowInfo *window) MakeSelectionVisible(window, window->lastFocus); /* restore the file's unmodified status if the file was unmodified - when the change being redone was originally made */ - if (redo->restoresToSaved) + when the change being redone was originally made. Also, remove + the backup file, since the text in the buffer is now identical to + the original file */ + if (redo->restoresToSaved) { SetWindowModified(window, False); + RemoveBackupFile(window); + } /* remove the redo record from the chain and free it */ removeRedoItem(window); -- 2.11.4.GIT