diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-13 19:35:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-13 19:35:55 +0100 |
commit | 3b68123cd271fb781da4055cf1a1cf52f4fee6a5 (patch) | |
tree | 5790985125861514c018ba26a269428a655f38fb /src/testdir/test_fold.vim | |
parent | 74ee5e2384b7f51b3dcff52720235b08a380e0ed (diff) |
patch 8.2.0002: "dj" only deletes first line of closed foldv8.2.0002
Problem: "dj" only deletes first line of closed fold.
Solution: Adjust last line of operator for linewise motion. (closes #5354)
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r-- | src/testdir/test_fold.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index 824a4f22f6..36de13656c 100644 --- a/src/testdir/test_fold.vim +++ b/src/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 |