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
free(backupname);
}
- skip_backup:
#endif /* !NANO_TINY */
/* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't
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);