Index: src/text.c =================================================================== --- src/text.c (revision 5032) +++ src/text.c (working copy) @@ -486,6 +486,8 @@ free(f->data); f->data = data; splice_node(f, t, f->next); + if (f == openfile->filebot) + openfile->filebot = t; goto_line_posx(u->lineno, u->begin); break; case CUT_EOF: