When redoing a text add, actually copy the beginning of the line back!

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2008-08-01 04:11:57 +00:00
parent 91a1862eed
commit 1f37c4514d
1 changed files with 1 additions and 0 deletions

View File

@ -501,6 +501,7 @@ void do_redo(void)
undidmsg = _("text add");
len = strlen(f->data) + strlen(u->strdata) + 1;
data = charalloc(len);
strncpy(data, f->data, u->begin);
strcpy(&data[u->begin], u->strdata);
strcpy(&data[u->begin + strlen(u->strdata)], &f->data[u->begin]);
free(f->data);