patch 9.0.1691: wrong viewport restored for incsearch and smoothscroll

Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: #12713

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index ef44751..f3bc6bf 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -2080,6 +2080,28 @@
   call StopVimInTerminal(buf)
 endfunc
 
+func Test_incsearch_restore_view()
+  CheckOption incsearch
+  CheckScreendump
+
+  let lines =<< trim [CODE]
+    set incsearch nohlsearch
+    setlocal scrolloff=0 smoothscroll
+    call setline(1, [join(range(25), ' '), '', '', '', '', 'xxx'])
+    call feedkeys("2\<C-E>", 't')
+  [CODE]
+  call writefile(lines, 'Xincsearch_restore_view', 'D')
+  let buf = RunVimInTerminal('-S Xincsearch_restore_view', {'rows': 6, 'cols': 20})
+
+  call VerifyScreenDump(buf, 'Test_incsearch_restore_view_01', {})
+  call term_sendkeys(buf, '/xxx')
+  call VerifyScreenDump(buf, 'Test_incsearch_restore_view_02', {})
+  call term_sendkeys(buf, "\<Esc>")
+  call VerifyScreenDump(buf, 'Test_incsearch_restore_view_01', {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
 func Test_pattern_is_uppercase_smartcase()
   new
   let input=['abc', 'ABC', 'Abc', 'abC']