comparison src/testdir/test_fold.vim @ 15119:6e9f37bf987b v8.1.0570

patch 8.1.0570: 'commentstring' not used when adding fold marker commit https://github.com/vim/vim/commit/539328197c51c1586cbbb6b6be3db3c412249b49 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 7 21:08:49 2018 +0100 patch 8.1.0570: 'commentstring' not used when adding fold marker Problem: 'commentstring' not used when adding fold marker. (Maxim Kim) Solution: Only use empty 'comments' middle when leader is empty. (Christian Brabandt, closes #3670)
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Dec 2018 21:15:04 +0100
parents 081f30c50300
children 31a0127813cb
comparison
equal deleted inserted replaced
15118:3df7c81ddc16 15119:6e9f37bf987b
693 693
694 " clean up 694 " clean up
695 call StopVimInTerminal(buf) 695 call StopVimInTerminal(buf)
696 call delete('Xtest_folds_with_rnu') 696 call delete('Xtest_folds_with_rnu')
697 endfunc 697 endfunc
698
699 func Test_folds_marker_in_comment2()
700 new
701 call setline(1, ['Lorem ipsum dolor sit', 'Lorem ipsum dolor sit', 'Lorem ipsum dolor sit'])
702 setl fen fdm=marker
703 setl commentstring=<!--%s-->
704 setl comments=s:<!--,m:\ \ \ \ ,e:-->
705 norm! zf2j
706 setl nofen
707 :1y
708 call assert_equal(['Lorem ipsum dolor sit<!--{{{-->'], getreg(0,1,1))
709 :+2y
710 call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1))
711
712 set foldmethod&
713 bwipe!
714 endfunc