From 1f37c4514d1839b3da23dda5f28153e7edfd28c0 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Fri, 1 Aug 2008 04:11:57 +0000 Subject: [PATCH] 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 --- src/text.c | 1 + 1 file changed, 1 insertion(+) 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);