diff --git a/src/cut.c b/src/cut.c index a00d705d..aa42d943 100644 --- a/src/cut.c +++ b/src/cut.c @@ -284,6 +284,9 @@ void do_uncut_text(void) /* Mark the file as modified. */ set_modified(); + /* Update the cursor position to account for the inserted lines. */ + reset_cursor(); + refresh_needed = TRUE; #ifndef DISABLE_COLOR diff --git a/src/nano.c b/src/nano.c index 0e371d50..d1dba354 100644 --- a/src/nano.c +++ b/src/nano.c @@ -469,11 +469,6 @@ void copy_from_filestruct(filestruct *somebuffer) /* Add the number of characters in the copied text to the file size. */ openfile->totsize += get_totsize(openfile->fileage, openfile->filebot); - /* Update the current y-coordinate to account for the number of - * lines the copied text has, less one since the first line will be - * tacked onto the current line. */ - openfile->current_y += openfile->filebot->lineno - 1; - /* If we pasted onto the first line of the edit window, the corresponding * struct has been freed, so... point at the start of the copied text. */ if (edittop_inside)