aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_diffmode.vim14
-rw-r--r--test/old/testdir/test_normal.vim12
-rw-r--r--test/old/testdir/test_scroll_opt.vim8
3 files changed, 24 insertions, 10 deletions
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim
index 3cc8f97f2f..71483b7469 100644
--- a/test/old/testdir/test_diffmode.vim
+++ b/test/old/testdir/test_diffmode.vim
@@ -1774,17 +1774,19 @@ endfunc
" Ctrl-D reveals filler lines below the last line in the buffer.
func Test_diff_eob_halfpage()
- 5new
+ new
call setline(1, ['']->repeat(10) + ['a'])
diffthis
- call assert_true(5, winheight(5))
- 5new
+ new
call setline(1, ['']->repeat(3) + ['a', 'b'])
diffthis
+ resize 5
wincmd j
- resize 7
- exe "norm! G\<C-D>"
- call assert_equal(6, line('w0'))
+ resize 5
+ norm G
+ call assert_equal(7, line('w0'))
+ exe "norm! \<C-D>"
+ call assert_equal(8, line('w0'))
%bwipe!
endfunc
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index 10fbf4125a..9f9d9367dc 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -4235,4 +4235,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/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index cb37b09707..50b0e13ba4 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -1031,10 +1031,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('.'))
@@ -1046,10 +1046,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('.'))