Mercurial > vim
diff src/testdir/test_fold.vim @ 10486:99896ee0cac5 v8.0.0136
commit https://github.com/vim/vim/commit/54b2bfa399017ebae76ed62f21578261d1b55c1f
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 2 14:57:08 2017 +0100
patch 8.0.0136
Problem: When using indent folding and changing indent the wrong fold is
opened. (Jonathan Fudger)
Solution: Open the fold under the cursor a bit later. (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 02 Jan 2017 15:00:04 +0100 |
parents | c7de1536780a |
children | 2645a98217fa |
line wrap: on
line diff
--- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -63,3 +63,35 @@ function! Test_address_fold() quit! endfunction + +function! Test_indent_fold() + new + call setline(1, ['', 'a', ' b', ' c']) + setl fen fdm=indent + 2 + norm! >> + let a=map(range(1,4), 'foldclosed(v:val)') + call assert_equal([-1,-1,-1,-1], a) +endfu + +function! Test_indent_fold() + new + call setline(1, ['', 'a', ' b', ' c']) + setl fen fdm=indent + 2 + norm! >> + let a=map(range(1,4), 'foldclosed(v:val)') + call assert_equal([-1,-1,-1,-1], a) + bw! +endfu + +function! Test_indent_fold2() + new + call setline(1, ['', '{{{', '}}}', '{{{', '}}}']) + setl fen fdm=marker + 2 + norm! >> + let a=map(range(1,5), 'foldclosed(v:val)') + call assert_equal([-1,-1,-1,4,4], a) + bw! +endfu