aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_scroll_opt.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_scroll_opt.vim')
-rw-r--r--test/old/testdir/test_scroll_opt.vim45
1 files changed, 44 insertions, 1 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index 8130f7a1ac..fbc714d9cc 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -832,7 +832,7 @@ func Test_smoothscroll_eob()
call VerifyScreenDump(buf, 'Test_smooth_eob_1', {})
" cursor is not placed below window
- call term_sendkeys(buf, ":call setline(92, 'a'->repeat(100))\<CR>\<C-B>G")
+ call term_sendkeys(buf, ":call setline(92, 'a'->repeat(100))\<CR>\<C-L>\<C-B>G")
call VerifyScreenDump(buf, 'Test_smooth_eob_2', {})
call StopVimInTerminal(buf)
@@ -1001,4 +1001,47 @@ func Test_smoothscroll_textoff_small_winwidth()
set smoothscroll& number&
endfunc
+func Test_smoothscroll_page()
+ set smoothscroll
+
+ 10split | 40vsplit
+ call setline(1, 'abcde '->repeat(150))
+
+ exe "norm! \<C-F>"
+ call assert_equal(400, winsaveview().skipcol)
+ exe "norm! \<C-F>"
+ call assert_equal(800, winsaveview().skipcol)
+ exe "norm! \<C-F>"
+ call assert_equal(880, winsaveview().skipcol)
+ exe "norm! \<C-B>"
+ call assert_equal(480, winsaveview().skipcol)
+ exe "norm! \<C-B>"
+ call assert_equal(80, winsaveview().skipcol)
+ exe "norm! \<C-B>"
+ call assert_equal(0, winsaveview().skipcol)
+
+ exe "norm! \<C-D>"
+ call assert_equal(200, winsaveview().skipcol)
+ exe "norm! \<C-D>"
+ call assert_equal(400, winsaveview().skipcol)
+ exe "norm! \<C-D>"
+ call assert_equal(600, winsaveview().skipcol)
+ exe "norm! \<C-D>"
+ call assert_equal(800, winsaveview().skipcol)
+ exe "norm! \<C-D>"
+ call assert_equal(880, winsaveview().skipcol)
+ exe "norm! \<C-U>"
+ call assert_equal(680, winsaveview().skipcol)
+ exe "norm! \<C-U>"
+ call assert_equal(480, winsaveview().skipcol)
+ exe "norm! \<C-U>"
+ call assert_equal(280, winsaveview().skipcol)
+ exe "norm! \<C-U>"
+ call assert_equal(80, winsaveview().skipcol)
+ exe "norm! \<C-U>"
+ call assert_equal(0, winsaveview().skipcol)
+
+ set smoothscroll&
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab