aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua15
-rw-r--r--test/old/testdir/test_scroll_opt.vim5
2 files changed, 19 insertions, 1 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index c63401cb02..fb4990ff00 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -307,7 +307,7 @@ describe('smoothscroll', function()
screen:try_resize(40, 8)
exec([[
call setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7))
- set smoothscroll scrolloff=0
+ set smoothscroll scrolloff=0 display=
:3
]])
screen:expect([[
@@ -322,9 +322,22 @@ describe('smoothscroll', function()
]])
feed('j')
screen:expect_unchanged()
+ -- moving cursor down - whole bottom line shows
feed('<C-E>j')
screen:expect_unchanged()
feed('G')
screen:expect_unchanged()
+ -- moving cursor up - whole top line shows
+ feed('2k')
+ screen:expect([[
+ ^Line with some text with some text with |
+ some text with some text with some text |
+ with some text with some text |
+ Line with some text with some text with |
+ some text with some text with some text |
+ with some text with some text |
+ @ |
+ |
+ ]])
end)
end)
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index 799db19298..77e656cf9f 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -198,6 +198,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', {})
@@ -207,6 +208,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