diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-16 08:37:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 08:37:42 +0800 |
| commit | 5dc4eaf386d70b9bbef321a00bcbb5d475f36542 (patch) | |
| tree | 4dd105e8c45b6f7b47f22afeb18b3bfcc8c0144f /src/nvim/testdir/test_scroll_opt.vim | |
| parent | f1c5887377c9ae547a7564ec4fc52d72656a974f (diff) | |
| parent | 0bb3a373d32e150af3909e3873be91f34df211dc (diff) | |
| download | rneovim-5dc4eaf386d70b9bbef321a00bcbb5d475f36542.tar.gz rneovim-5dc4eaf386d70b9bbef321a00bcbb5d475f36542.tar.bz2 rneovim-5dc4eaf386d70b9bbef321a00bcbb5d475f36542.zip | |
Merge pull request #22275 from zeertzjq/vim-9.0.1309
vim-patch:9.0.{1309,1310,1312}: scrolling two lines with even line count and 'scrolloff'
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 |