diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-07 21:08:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-07 21:08:49 +0100 |
commit | 539328197c51c1586cbbb6b6be3db3c412249b49 (patch) | |
tree | a3da5f68060890ad7d890cad60dd79c4d989ded8 /src/testdir/test_fold.vim | |
parent | 10ccaa17ec8b2be1132fd19059e1cd5fb5c902c4 (diff) | |
download | vim-git-539328197c51c1586cbbb6b6be3db3c412249b49.tar.gz |
patch 8.1.0570: 'commentstring' not used when adding fold markerv8.1.0570
Problem: 'commentstring' not used when adding fold marker. (Maxim Kim)
Solution: Only use empty 'comments' middle when leader is empty. (Christian
Brabandt, closes #3670)
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r-- | src/testdir/test_fold.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index 0384b4fd0..f8664d46f 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -695,3 +695,20 @@ func Test_folds_with_rnu() call StopVimInTerminal(buf) call delete('Xtest_folds_with_rnu') endfunc + +func Test_folds_marker_in_comment2() + new + call setline(1, ['Lorem ipsum dolor sit', 'Lorem ipsum dolor sit', 'Lorem ipsum dolor sit']) + setl fen fdm=marker + setl commentstring=<!--%s--> + setl comments=s:<!--,m:\ \ \ \ ,e:--> + norm! zf2j + setl nofen + :1y + call assert_equal(['Lorem ipsum dolor sit<!--{{{-->'], getreg(0,1,1)) + :+2y + call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1)) + + set foldmethod& + bwipe! +endfunc |