summaryrefslogtreecommitdiff
path: root/src/testdir/test_fold.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-12 20:37:21 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-12 20:37:21 +0100
commit025a6b708a9bff54c73fb9c641b980da19e943a9 (patch)
tree9d1534b7d2637c7ef6c851a158c2eb99becefbfd /src/testdir/test_fold.vim
parent1c46544412382db8b3203d6c78e550df885540bd (diff)
downloadvim-025a6b708a9bff54c73fb9c641b980da19e943a9.zip
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)
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r--src/testdir/test_fold.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index 3c27f4f70..f10480bb4 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
@@ -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'