aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-28 19:47:40 +0800
committerGitHub <noreply@github.com>2024-03-28 19:47:40 +0800
commitdde2cc65fd2ac89ad88b19df08dc03cf1da50316 (patch)
tree8a4f3e3165e071639598fed73981ffa05b1c4b0d /test/old/testdir/test_diffmode.vim
parent346a6390286cf58d8a618fd9d803523e497c8af1 (diff)
parent2f638c0ac6275bebacd12671481642fa43d7ba10 (diff)
downloadrneovim-dde2cc65fd2ac89ad88b19df08dc03cf1da50316.tar.gz
rneovim-dde2cc65fd2ac89ad88b19df08dc03cf1da50316.tar.bz2
rneovim-dde2cc65fd2ac89ad88b19df08dc03cf1da50316.zip
Merge pull request #28044 from luukvbaal/vim-9.1.0211
vim-patch:9.1.{0211,0215}
Diffstat (limited to 'test/old/testdir/test_diffmode.vim')
-rw-r--r--test/old/testdir/test_diffmode.vim40
1 files changed, 22 insertions, 18 deletions
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim
index c1a63a6f88..3e7eabf8f5 100644
--- a/test/old/testdir/test_diffmode.vim
+++ b/test/old/testdir/test_diffmode.vim
@@ -1632,34 +1632,38 @@ endfunc
func Test_diff_scroll_many_filler()
20new
vnew
- call setline(1, ['^^^', '^^^', '$$$', '$$$'])
+ call setline(1, range(1, 40))
diffthis
setlocal scrolloff=0
wincmd p
- call setline(1, ['^^^', '^^^'] + repeat(['###'], 41) + ['$$$', '$$$'])
+ call setline(1, range(1, 20)->reverse() + ['###']->repeat(41) + range(21, 40)->reverse())
diffthis
setlocal scrolloff=0
wincmd p
redraw
" Note: need a redraw after each scroll, otherwise the test always passes.
- normal! G
- redraw
- call assert_equal(3, winsaveview().topline)
- call assert_equal(18, winsaveview().topfill)
- exe "normal! \<C-B>"
- redraw
- call assert_equal(3, winsaveview().topline)
- call assert_equal(19, winsaveview().topfill)
- exe "normal! \<C-B>"
- redraw
- call assert_equal(2, winsaveview().topline)
- call assert_equal(0, winsaveview().topfill)
- exe "normal! \<C-B>"
- redraw
- call assert_equal(1, winsaveview().topline)
- call assert_equal(0, winsaveview().topfill)
+ for _ in range(2)
+ normal! G
+ redraw
+ call assert_equal(40, winsaveview().topline)
+ call assert_equal(19, winsaveview().topfill)
+ exe "normal! \<C-B>"
+ redraw
+ call assert_equal(22, winsaveview().topline)
+ call assert_equal(0, winsaveview().topfill)
+ exe "normal! \<C-B>"
+ redraw
+ call assert_equal(4, winsaveview().topline)
+ call assert_equal(0, winsaveview().topfill)
+ exe "normal! \<C-B>"
+ redraw
+ call assert_equal(1, winsaveview().topline)
+ call assert_equal(0, winsaveview().topfill)
+ set smoothscroll
+ endfor
+ set smoothscroll&
bwipe!
bwipe!
endfunc