From: Chris Allegretta Date: Fri, 1 Aug 2008 04:11:57 +0000 (+0000) Subject: When redoing a text add, actually copy the beginning of the line back! X-Git-Tag: v2.1.3~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1f37c4514d1839b3da23dda5f28153e7edfd28c0;p=nano.git 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 --- diff --git a/src/text.c b/src/text.c index a70e10a2..c0629a8f 100644 --- a/src/text.c +++ b/src/text.c @@ -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);