patch 9.0.0673: first line wong with 'smoothscroll' and 'scrolloff' zero
Problem: First line not scrolled properly with 'smoothscroll' and
'scrolloff' zero and using "k".
Solution: Make sure the cursor position is visible.
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index d11d0be..0292fa1 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -181,6 +181,7 @@
call VerifyScreenDump(buf, 'Test_smooth_wrap_1', {})
+ " moving cursor down - whole bottom line shows
call term_sendkeys(buf, "j")
call VerifyScreenDump(buf, 'Test_smooth_wrap_2', {})
@@ -190,6 +191,10 @@
call term_sendkeys(buf, "G")
call VerifyScreenDump(buf, 'Test_smooth_wrap_4', {})
+ " moving cursor up - whole top line shows
+ call term_sendkeys(buf, "2k")
+ call VerifyScreenDump(buf, 'Test_smooth_wrap_5', {})
+
call StopVimInTerminal(buf)
endfunc