patch 9.0.1545: text not scrolled when cursor moved with "g0" and "h"

Problem:    Text not scrolled when cursor moved with "g0" and "h".
Solution:   Adjust w_skipcol when needed. (Luuk van Baal, closes #12387)
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index c12da97..0bdf684 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -419,6 +419,18 @@
   exe "normal \<C-Y>"
   call s:check_col_calc(1, 3, 41)
 
+  " Test "g0/g<Home>"
+  exe "normal gg\<C-E>"
+  norm $gkg0
+  call s:check_col_calc(1, 2, 21)
+
+  " Test moving the cursor behind the <<< display with 'virtualedit'
+  set virtualedit=all
+  exe "normal \<C-E>"
+  norm 3lgkh
+  call s:check_col_calc(3, 2, 23)
+  set virtualedit&
+
   normal gg3l
   exe "normal \<C-E>"