diff --git a/src/cut.c b/src/cut.c index 8c141b947f2c271e1eee42d7ba83d7eb7bdb72a7..ec514b3be2efeb273db7741b3184c15a0df9f315 100644 --- a/src/cut.c +++ b/src/cut.c @@ -290,9 +290,6 @@ void do_uncut_text(void) /* Mark the file as modified. */ set_modified(); - /* Set the target row for the cursor in case it got pushed offscreen. */ - openfile->current_y = editwinrows - 1; - refresh_needed = TRUE; #ifndef DISABLE_COLOR diff --git a/src/files.c b/src/files.c index 1e4e4603826a1f47e87a49ffc8f7cb77ed68b91f..7ba166dada15dd6fb859d375d37f29f5cf07510c 100644 --- a/src/files.c +++ b/src/files.c @@ -1185,9 +1185,6 @@ void do_insertfile(void) openfile->current_x != was_current_x) set_modified(); - /* Set the target row for the cursor when pushed offscreen. */ - openfile->current_y = editwinrows - 1; - refresh_needed = TRUE; } diff --git a/src/winio.c b/src/winio.c index 31da93878182e172141d15290732e428ae88f1eb..c5f1fe266c19991ab88ab23c76aaa2f81e7efe8e 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3216,6 +3216,7 @@ void edit_refresh(void) fprintf(stderr, "edit-refresh: line = %ld, edittop = %ld and editwinrows = %d\n", (long)openfile->current->lineno, (long)openfile->edittop->lineno, editwinrows); #endif + openfile->current_y = editwinrows - 1; adjust_viewport((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : STATIONARY); }