From 71d4b81b4cca76cf4c60105460e1ecbc09d9e86b Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Mon, 13 Mar 2017 01:54:35 +0100 Subject: 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 --- src/nvim/testdir/test_fold.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/nvim/testdir') 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 -- cgit