summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_normal.vim12
-rw-r--r--src/testdir/test_scroll_opt.vim8
2 files changed, 16 insertions, 4 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 5b1bb402b6..4f99095415 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4225,4 +4225,16 @@ func Test_single_line_filler_zb()
bw!
endfunc
+" Test for Ctrl-U not getting stuck at end of buffer with 'scrolloff'.
+func Test_halfpage_scrolloff_eob()
+ set scrolloff=5
+
+ call setline(1, range(1, 100))
+ exe "norm! Gzz\<C-U>zz"
+ call assert_notequal(100, line('.'))
+
+ set scrolloff&
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index e09c240a09..cda9bf0d78 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -1028,10 +1028,10 @@ func Test_smoothscroll_page()
call assert_equal(415, col('.'))
exe "norm! \<C-D>"
call assert_equal(520, winsaveview().skipcol)
- call assert_equal(535, col('.'))
+ call assert_equal(615, col('.'))
exe "norm! \<C-D>"
call assert_equal(520, winsaveview().skipcol)
- call assert_equal(735, col('.'))
+ call assert_equal(815, col('.'))
exe "norm! \<C-D>"
call assert_equal(520, winsaveview().skipcol)
call assert_equal(895, col('.'))
@@ -1043,10 +1043,10 @@ func Test_smoothscroll_page()
call assert_equal(495, col('.'))
exe "norm! \<C-U>"
call assert_equal(0, winsaveview().skipcol)
- call assert_equal(375, col('.'))
+ call assert_equal(295, col('.'))
exe "norm! \<C-U>"
call assert_equal(0, winsaveview().skipcol)
- call assert_equal(175, col('.'))
+ call assert_equal(95, col('.'))
exe "norm! \<C-U>"
call assert_equal(0, winsaveview().skipcol)
call assert_equal(15, col('.'))