aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_fold.vim
diff options
context:
space:
mode:
authorMatthieu Coudron <matthieu.coudron@upmc.fr>2017-03-13 01:54:35 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-13 01:54:35 +0100
commit71d4b81b4cca76cf4c60105460e1ecbc09d9e86b (patch)
treeeaced58e79a8aac0fe9d0f240d4eeec340833d78 /src/nvim/testdir/test_fold.vim
parentc42aebf23ef051885e9fe2df5842d9209ed89789 (diff)
downloadrneovim-71d4b81b4cca76cf4c60105460e1ecbc09d9e86b.tar.gz
rneovim-71d4b81b4cca76cf4c60105460e1ecbc09d9e86b.tar.bz2
rneovim-71d4b81b4cca76cf4c60105460e1ecbc09d9e86b.zip
vim-patch:8.0.0453 (#6266)
Problem: Adding fold marker creates new comment. Solution: Use an existing comment if possible. (LemonBoy, closes vim/vim#1549) https://github.com/vim/vim/commit/025a6b708a9bff54c73fb9c641b980da19e943a9
Diffstat (limited to 'src/nvim/testdir/test_fold.vim')
-rw-r--r--src/nvim/testdir/test_fold.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index 1f835b876f..7cb9faa75f 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -96,6 +96,22 @@ func! Test_indent_fold2()
bw!
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 Test_manual_fold_with_filter()
if !executable('cat')
return