{
undo *u = openfile->undotop;
filestruct *f = openfile->current, *t;
+ filestruct *oldcutbuffer = cutbuffer, *oldcutbottom = cutbottom;
int len = 0, i;
char *undidmsg, *data;
u->strdata = f->data;
f->data = data;
break;
+ case INSERT:
+ undidmsg = _("text insert");
+ cutbuffer = u->cutbuffer;
+ cutbottom = u->cutbottom;
+ do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
+ do_uncut_text();
+ cutbuffer = oldcutbuffer;
+ cutbottom = oldcutbottom;
+ break;
default:
undidmsg = _("wtf?");
break;
fs->undotop = fs->undotop->next;
if (u2->strdata != NULL)
free(u2->strdata);
- while (u2->cutbuffer != NULL) {
- filestruct *f2 = u2->cutbuffer->next;
- u2->cutbuffer = u2->cutbuffer->next;
- free(f2);
- }
+ if (u2->cutbuffer);
+ free_filestruct(u2->cutbuffer);
free(u2);
}