1
0
forked from aniani/vim

patch 8.0.0453: adding fold marker creates new comment

Problem:    Adding fold marker creates new comment.
Solution:   Use an existing comment if possible. (LemonBoy, closes #1549)
This commit is contained in:
Bram Moolenaar
2017-03-12 20:37:21 +01:00
parent 1c46544412
commit 025a6b708a
5 changed files with 27 additions and 5 deletions

View File

@@ -168,6 +168,22 @@ func Test_combining_folds_marker()
bwipe!
endfunc
func Test_folds_marker_in_comment()
new
call setline(1, ['" foo', 'bar', 'baz'])
setl fen fdm=marker
setl com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" cms=\"%s
norm! zf2j
setl nofen
:1y
call assert_equal(['" foo{{{'], getreg(0,1,1))
:+2y
call assert_equal(['baz"}}}'], getreg(0,1,1))
set foldmethod&
bwipe!
endfunc
func s:TestFoldExpr(lnum)
let thisline = getline(a:lnum)
if thisline == 'a'