Index: src/text.c =================================================================== --- src/text.c (revision 5394) +++ src/text.c (working copy) @@ -677,8 +677,16 @@ break; case ENTER: redidmsg = _("line break"); - goto_line_posx(u->lineno, u->begin); - do_enter(TRUE); + filestruct *t = make_new_node(f); + t->data = mallocstrcpy(NULL, u->strdata); + data = mallocstrncpy(NULL, f->data, u->begin + 1); + data[u->begin] = '\0'; + free(f->data); + f->data = data; + splice_node(f, t, f->next); + if (f == openfile->filebot) + openfile->filebot = t; + goto_line_posx(u->lineno + 1, u->mark_begin_x); break; #ifndef DISABLE_WRAPPING case SPLIT_BEGIN: @@ -1156,6 +1164,7 @@ u->mark_begin_lineno = openfile->current->lineno; break; case ENTER: + u->strdata = mallocstrcpy(NULL, fs->current->data); u->mark_begin_x = fs->current_x; break; #ifndef DISABLE_WRAPPING