aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_fold.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-04-05 20:01:07 -0400
committerGitHub <noreply@github.com>2021-04-05 20:01:07 -0400
commitcc9f7e717b80208fec79150b99c17eba04535496 (patch)
tree6d5e29f0bd7c8b293b873f41324fb813238acb7a /src/nvim/testdir/test_fold.vim
parent2c4e9c5245285b5a0a76e044b72481dfe6c468ab (diff)
parentce0153e4f77bf325cd8c7565e55b038a3ad6a11c (diff)
downloadrneovim-cc9f7e717b80208fec79150b99c17eba04535496.tar.gz
rneovim-cc9f7e717b80208fec79150b99c17eba04535496.tar.bz2
rneovim-cc9f7e717b80208fec79150b99c17eba04535496.zip
Merge pull request #14291 from janlazo/vim-8.2.2709
vim-patch:8.2.{2709,2711,2714,2717}
Diffstat (limited to 'src/nvim/testdir/test_fold.vim')
-rw-r--r--src/nvim/testdir/test_fold.vim29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index 2d058e8e32..fcdf888b96 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -823,31 +823,36 @@ func Test_fold_create_delete()
endfunc
func Test_fold_relative_move()
- enew!
+ new
set fdm=indent sw=2 wrap tw=80
- let content = [ ' foo', ' bar', ' baz',
- \ repeat('x', &columns + 1),
- \ ' foo', ' bar', ' baz'
+ let longtext = repeat('x', &columns + 1)
+ let content = [ ' foo', ' ' .. longtext, ' baz',
+ \ longtext,
+ \ ' foo', ' ' .. longtext, ' baz'
\ ]
call append(0, content)
normal zM
- call cursor(3, 1)
- call assert_true(foldclosed(line('.')))
- normal gj
- call assert_equal(2, winline())
+ for lnum in range(1, 3)
+ call cursor(lnum, 1)
+ call assert_true(foldclosed(line('.')))
+ normal gj
+ call assert_equal(2, winline())
+ endfor
call cursor(2, 1)
call assert_true(foldclosed(line('.')))
normal 2gj
call assert_equal(3, winline())
- call cursor(5, 1)
- call assert_true(foldclosed(line('.')))
- normal gk
- call assert_equal(3, winline())
+ for lnum in range(5, 7)
+ call cursor(lnum, 1)
+ call assert_true(foldclosed(line('.')))
+ normal gk
+ call assert_equal(3, winline())
+ endfor
call cursor(6, 1)
call assert_true(foldclosed(line('.')))