diff --git a/ChangeLog b/ChangeLog index 54ad1970b25b2bb8713b6af0a6cc38196364c446..0b055bc91684630c43b59a3ebe690f5aad5fd5e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-08-08 Chris Allegretta <chrisa@asty.org> - * files.c: Do not go on and attempt to write the main file if writing the backup file failed, + * files.c (write_file): Do not go on and attempt to write the main file if writing the backup file failed, related to Savannah bug 24000. + * text.c (do_redo): Fix improperly restoring the text when redoing a line split. 2008-07-23 Chris Allegretta <chrisa@asty.org> * text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly diff --git a/src/files.c b/src/files.c index 11ac11dd971729649c466100950e072ee7255bd7..d37c75d755fca4ae76e332d242e9aeb8d90cec86 100644 --- a/src/files.c +++ b/src/files.c @@ -1540,7 +1540,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type free(backupname); } - skip_backup: #endif /* !NANO_TINY */ /* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't diff --git a/src/text.c b/src/text.c index eeca2c80c68feec5c279e55eed13433e04c68756..041e58f92a890fe45d2233f5917f1066ae81e3e0 100644 --- a/src/text.c +++ b/src/text.c @@ -551,7 +551,7 @@ void do_redo(void) case SPLIT: undidmsg = _("line split"); t = make_new_node(f); - t->data = mallocstrcpy(NULL, u->strdata); + t->data = mallocstrcpy(NULL, &u->strdata[u->begin]); data = mallocstrncpy(NULL, f->data, u->begin); data[u->begin] = '\0'; free(f->data);