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 #4927)
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index 7aef51f..824a4f2 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
@@ -757,3 +757,15 @@
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