commit 6f681c1be2eff166cb99d8e745f6d660c65f1ab7
parent a50d0e35f7f504077e1a01d83b9b8bbb6db13c01
Author: Chris Allegretta <chrisa@asty.org>
Date: Fri, 8 Aug 2008 03:02:03 +0000
* text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly
mistakenly think this is an update when it's really an add. Also
Fix an extra ; after an if statement which makes nano try to free a struct which
may be NULL
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-23 Chris Allegretta <chrisa@asty.org>
+ * text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly
+ mistakenly think this is an update when it's really an add. Also
+ Fix an extra ; after an if statement which makes nano try to free a struct which
+ may be NULL
+
GNU nano 2.1.3 - 2008.08.04
2008-07-23 Chris Allegretta <chrisa@asty.org>
* configure.ac: Add ncursesw dir to include path if lib detected
diff --git a/src/text.c b/src/text.c
@@ -491,7 +491,7 @@ void do_undo(void)
do_gotolinecolumn(u->lineno, u->begin, FALSE, FALSE, FALSE, TRUE);
statusbar(_("Undid action (%s)"), undidmsg);
openfile->current_undo = openfile->current_undo->next;
-
+ openfile->last_action = OTHER;
}
void do_redo(void)
@@ -638,6 +638,7 @@ void do_redo(void)
statusbar(_("Redid action (%s)"), undidmsg);
openfile->current_undo = u;
+ openfile->last_action = OTHER;
}
#endif /* !NANO_TINY */
@@ -814,7 +815,7 @@ void add_undo(undo_type current_action)
fs->undotop = fs->undotop->next;
if (u2->strdata != NULL)
free(u2->strdata);
- if (u2->cutbuffer);
+ if (u2->cutbuffer)
free_filestruct(u2->cutbuffer);
free(u2);
}