patch 9.0.1121: cursor positioning and display problems with 'smoothscroll'

Problem:    Cursor positioning and display problems with 'smoothscroll' and
            using "zt", "zb" or "zz".
Solution:   Adjust computations and conditions. (Yee Cheng Chin,
            closes #11764)
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index 58a8bf4..2fa9168 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -296,6 +296,14 @@
   call term_sendkeys(buf, "0j")
   call VerifyScreenDump(buf, 'Test_smooth_long_10', {})
 
+  " Test zt/zz/zb that they work properly when a long line is above it
+  call term_sendkeys(buf, "zb")
+  call VerifyScreenDump(buf, 'Test_smooth_long_11', {})
+  call term_sendkeys(buf, "zz")
+  call VerifyScreenDump(buf, 'Test_smooth_long_12', {})
+  call term_sendkeys(buf, "zt")
+  call VerifyScreenDump(buf, 'Test_smooth_long_13', {})
+
   " Repeat the step and move the cursor down again.
   " This time, use a shorter long line that is barely long enough to span more
   " than one window. Note that the cursor is at the bottom this time because
@@ -303,7 +311,7 @@
   call term_sendkeys(buf, ":call setline(1, ['one', 'two', 'Line' .. (' with lots of text'->repeat(10)) .. ' end', 'four'])\<CR>")
   call term_sendkeys(buf, "3Gzt")
   call term_sendkeys(buf, "j")
-  call VerifyScreenDump(buf, 'Test_smooth_long_11', {})
+  call VerifyScreenDump(buf, 'Test_smooth_long_14', {})
 
   " Repeat the step but this time start it when the line is smooth-scrolled by
   " one line. This tests that the offset calculation is still correct and
@@ -311,7 +319,7 @@
   " screen.
   call term_sendkeys(buf, "3Gzt")
   call term_sendkeys(buf, "\<C-E>j")
-  call VerifyScreenDump(buf, 'Test_smooth_long_12', {})
+  call VerifyScreenDump(buf, 'Test_smooth_long_15', {})
   
   call StopVimInTerminal(buf)
 endfunc