Index: src/text.c =================================================================== --- src/text.c (revision 5006) +++ src/text.c (working copy) @@ -640,6 +640,8 @@ strcat(f->data, u->strdata); if (f->next != NULL) { filestruct *tmp = f->next; + if (tmp == openfile->filebot) + openfile->filebot = f; unlink_node(tmp); delete_node(tmp); }