From 97b82553e09b949cae90c6e755d218d5cdca8f12 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 22 Sep 2019 19:49:03 +0200 Subject: vim-patch:8.1.2052: using "x" before a closed fold may delete that fold Problem: Using "x" before a closed fold may delete that fold. Solution: Do not translate 'x' do "dl". (Christian Brabandt, closes vim/vim#4927) https://github.com/vim/vim/commit/7a9bd7c1e0ce1baf5a02daf36eeae3638aa315c7 --- src/nvim/testdir/test_fold.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_fold.vim') diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 3cb42579be..03723b3cb5 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -756,3 +756,15 @@ func Test_fold_delete_with_marker() bwipe! bwipe! endfunc + +func Test_fold_delete_with_marker_and_whichwrap() + new + let content1 = [''] + let content2 = ['folded line 1 "{{{1', ' test', ' test2', ' test3', '', 'folded line 2 "{{{1', ' test', ' test2', ' test3'] + call setline(1, content1 + content2) + set fdm=marker ww+=l + normal! x + call assert_equal(content2, getline(1, '$')) + set fdm& ww& + bwipe! +endfunc -- cgit From c84b39150f3f5e12e042777f61ca9adf13be09d8 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Mon, 23 Sep 2019 22:12:02 +0200 Subject: vim-patch:8.1.1362: code and data in tests can be hard to read Problem: Code and data in tests can be hard to read. Solution: Use the new heredoc style. (Yegappan Lakshmanan, closes vim/vim#4400) https://github.com/vim/vim/commit/c79745a82faeb5a6058e915ca49a4c69fa60ea01 --- src/nvim/testdir/test_fold.vim | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/nvim/testdir/test_fold.vim') diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 03723b3cb5..324f3f8cf2 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -520,17 +520,18 @@ func Test_fold_create_marker_in_C() set fdm=marker fdl=9 set filetype=c - let content = [ - \ '/*', - \ ' * comment', - \ ' * ', - \ ' *', - \ ' */', - \ 'int f(int* p) {', - \ ' *p = 3;', - \ ' return 0;', - \ '}' - \] + let content =<< trim [CODE] + /* + * comment + * + * + */ + int f(int* p) { + *p = 3; + return 0; + } + [CODE] + for c in range(len(content) - 1) bw! call append(0, content) -- cgit From 63cd5dd0ae3e079e0b69382f905637978a1e2300 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 13 Dec 2019 21:17:57 -0500 Subject: vim-patch:8.2.0002: "dj" only deletes first line of closed fold Problem: "dj" only deletes first line of closed fold. Solution: Adjust last line of operator for linewise motion. (closes vim/vim#5354) https://github.com/vim/vim/commit/3b68123cd271fb781da4055cf1a1cf52f4fee6a5 --- src/nvim/testdir/test_fold.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/nvim/testdir/test_fold.vim') diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 324f3f8cf2..56ed543d4b 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -769,3 +769,28 @@ func Test_fold_delete_with_marker_and_whichwrap() set fdm& ww& bwipe! endfunc + +func Test_fold_delete_first_line() + new + call setline(1, [ + \ '" x {{{1', + \ '" a', + \ '" aa', + \ '" x {{{1', + \ '" b', + \ '" bb', + \ '" x {{{1', + \ '" c', + \ '" cc', + \ ]) + set foldmethod=marker + 1 + normal dj + call assert_equal([ + \ '" x {{{1', + \ '" c', + \ '" cc', + \ ], getline(1,'$')) + bwipe! + set foldmethod& +endfunc -- cgit From 5058b07122507e5cdd988dc956f0b6b359d18193 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 28 Apr 2020 23:13:23 -0400 Subject: vim-patch:8.1.1581: shared functions for testing are disorganised Problem: Shared functions for testing are disorganised. Solution: Group finctions in script files. (Ozaki Kiichi, closes vim/vim#4573) https://github.com/vim/vim/commit/7a39dd7f00239059ce34660611589b26126a550c --- src/nvim/testdir/test_fold.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir/test_fold.vim') diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 56ed543d4b..692f6e4780 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -1,6 +1,7 @@ " Test for folding source view_util.vim +source screendump.vim func PrepIndent(arg) return [a:arg] + repeat(["\t".a:arg], 5) -- cgit