Commit 5c27d723 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

* text.c (do_redo): Fix improperly restoring the text when redoing a line split.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
2008-08-08 Chris Allegretta <chrisa@asty.org> 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. 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> 2008-07-23 Chris Allegretta <chrisa@asty.org>
* text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly * text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly
......
...@@ -1540,7 +1540,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type ...@@ -1540,7 +1540,6 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
free(backupname); free(backupname);
} }
skip_backup:
#endif /* !NANO_TINY */ #endif /* !NANO_TINY */
/* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't /* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't
......
...@@ -551,7 +551,7 @@ void do_redo(void) ...@@ -551,7 +551,7 @@ void do_redo(void)
case SPLIT: case SPLIT:
undidmsg = _("line split"); undidmsg = _("line split");
t = make_new_node(f); 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 = mallocstrncpy(NULL, f->data, u->begin);
data[u->begin] = '\0'; data[u->begin] = '\0';
free(f->data); free(f->data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment