diff --git a/src/nano.c b/src/nano.c
index d87dbc17ecf01ab2ca85070d503c4621188ac64a..5d4a40f3a84c21f33597a022c8781520e07eff48 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1167,6 +1167,8 @@ void finish_stdin_pager(void)
 	nperror("fopen");
 
     read_file(f, 0, "stdin", TRUE, FALSE);
+    openfile->edittop = openfile->fileage;
+
     ttystdin = open("/dev/tty", O_RDONLY);
     if (!ttystdin)
 	die(_("Couldn't reopen stdin from keyboard, sorry\n"));