comparison 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
comparison
equal deleted inserted replaced
10485:145318e2eed4 10486:99896ee0cac5
61 :sil .,-2y 61 :sil .,-2y
62 call assert_equal(['4', '5', '}/*}}}*/'], getreg(0,1,1)) 62 call assert_equal(['4', '5', '}/*}}}*/'], getreg(0,1,1))
63 63
64 quit! 64 quit!
65 endfunction 65 endfunction
66
67 function! Test_indent_fold()
68 new
69 call setline(1, ['', 'a', ' b', ' c'])
70 setl fen fdm=indent
71 2
72 norm! >>
73 let a=map(range(1,4), 'foldclosed(v:val)')
74 call assert_equal([-1,-1,-1,-1], a)
75 endfu
76
77 function! Test_indent_fold()
78 new
79 call setline(1, ['', 'a', ' b', ' c'])
80 setl fen fdm=indent
81 2
82 norm! >>
83 let a=map(range(1,4), 'foldclosed(v:val)')
84 call assert_equal([-1,-1,-1,-1], a)
85 bw!
86 endfu
87
88 function! Test_indent_fold2()
89 new
90 call setline(1, ['', '{{{', '}}}', '{{{', '}}}'])
91 setl fen fdm=marker
92 2
93 norm! >>
94 let a=map(range(1,5), 'foldclosed(v:val)')
95 call assert_equal([-1,-1,-1,4,4], a)
96 bw!
97 endfu