summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_scroll_opt.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-06 15:46:49 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-06 15:46:49 +0100
commit46b54747c5d252c584571a321231bad9330018ec (patch)
treea49d7e0157563f453167d5a7bc0e766918f8042b /src/testdir/test_scroll_opt.vim
parent9bab7a024393200bb2c03b3abddfda86436990a7 (diff)
patch 9.0.0673: first line wong with 'smoothscroll' and 'scrolloff' zerov9.0.0673
Problem: First line not scrolled properly with 'smoothscroll' and 'scrolloff' zero and using "k". Solution: Make sure the cursor position is visible.
Diffstat (limited to 'src/testdir/test_scroll_opt.vim')
-rw-r--r--src/testdir/test_scroll_opt.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index d11d0be0f3..0292fa1f80 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -181,6 +181,7 @@ func Test_smoothscroll_wrap_scrolloff_zero()
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 @@ func Test_smoothscroll_wrap_scrolloff_zero()
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