Mercurial > vim
changeset 11036:9861e4196c43 v8.0.0407
patch 8.0.0407: filtering folds with marker method not tested
commit https://github.com/vim/vim/commit/3f3897e41f77a7bcd44ffd37acd4d524c0169ed4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 4 15:28:53 2017 +0100
patch 8.0.0407: filtering folds with marker method not tested
Problem: Filtering folds with marker method not tested.
Solution: Also set 'foldmethod' to "marker".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 04 Mar 2017 15:30:05 +0100 |
parents | 7ac8b9b2083c |
children | 81b54ec5af71 |
files | src/testdir/test_fold.vim src/version.c |
diffstat | 2 files changed, 18 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -100,15 +100,20 @@ func Test_manual_fold_with_filter() if !executable('cat') return endif - new - call setline(1, range(1, 20)) - 4,$fold - %foldopen - 10,$fold - %foldopen - " This filter command should not have an effect - 1,8! cat - call feedkeys('5ggzdzMGdd', 'xt') - call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$')) - bwipe! + for type in ['manual', 'marker'] + exe 'set foldmethod=' . type + new + call setline(1, range(1, 20)) + 4,$fold + %foldopen + 10,$fold + %foldopen + " This filter command should not have an effect + 1,8! cat + call feedkeys('5ggzdzMGdd', 'xt') + call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$')) + + bwipe! + set foldmethod& + endfor endfunc