patch 8.0.0515: ml_get errors in silent Ex mode

Problem:    ml_get errors in silent Ex mode. (Dominique Pelle)
Solution:   Clear valid flags when setting the cursor.  Set the topline when
            not in full screen mode.
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 9d59138..2b003c7 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -197,3 +197,14 @@
   " Only expect "vim" to appear in v:progname.
   call assert_match('vim\c', v:progname)
 endfunc
+
+func Test_silent_ex_mode()
+  if !has('unix') || has('gui_running')
+    " can't get output of Vim.
+    return
+  endif
+
+  " This caused an ml_get error.
+  let out = system(GetVimCommand() . '-u NONE -es -c''set verbose=1|h|exe "%norm\<c-y>\<c-d>"'' -c cq')
+  call assert_notmatch('E315:', out)
+endfunc