diff options
Diffstat (limited to 'src/nvim/testdir/test_scroll_opt.vim')
-rw-r--r-- | src/nvim/testdir/test_scroll_opt.vim | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_scroll_opt.vim b/src/nvim/testdir/test_scroll_opt.vim index 77920eb8b0..64f4ced470 100644 --- a/src/nvim/testdir/test_scroll_opt.vim +++ b/src/nvim/testdir/test_scroll_opt.vim @@ -1,5 +1,4 @@ " Test for reset 'scroll' -" func Test_reset_scroll() let scr = &l:scroll @@ -34,3 +33,22 @@ func Test_reset_scroll() quit! endfunc + +func Test_scolloff_even_line_count() + new + resize 6 + setlocal scrolloff=3 + call setline(1, range(20)) + normal 2j + call assert_equal(1, getwininfo(win_getid())[0].topline) + normal j + call assert_equal(1, getwininfo(win_getid())[0].topline) + normal j + call assert_equal(2, getwininfo(win_getid())[0].topline) + normal j + call assert_equal(3, getwininfo(win_getid())[0].topline) + + bwipe! +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |