* 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
master
Chris Allegretta 2008-08-08 03:02:03 +00:00
parent a50d0e35f7
commit 6f681c1be2
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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);
}