]> git.wh0rd.org Git - nano.git/commitdiff
When redoing a text add, actually copy the beginning of the line back!
authorChris Allegretta <chrisa@asty.org>
Fri, 1 Aug 2008 04:11:57 +0000 (04:11 +0000)
committerChris Allegretta <chrisa@asty.org>
Fri, 1 Aug 2008 04:11:57 +0000 (04:11 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/text.c

index a70e10a20e372787beb91742c5e01ded4a0d802f..c0629a8f488af89fe64653ed62d68b54870f9320 100644 (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);