splice_node(openfile->current, make_new_node(openfile->current),
openfile->current->next);
+ /* If the current line is the last line of the file, move the
+ * last line of the file down to the next line. */
if (openfile->filebot == openfile->current)
openfile->filebot = openfile->current->next;
if (openfile->current_x > wrap_loc) {
same_line_wrap = FALSE;
- if (openfile->filebot == openfile->current)
- openfile->filebot = openfile->current->next;
-
openfile->current = openfile->current->next;
openfile->current_x -= wrap_loc
#ifndef NANO_TINY