Mercurial > vim
diff src/testdir/test_fold.vim @ 18882:f9e41ffd3539 v8.2.0002
patch 8.2.0002: "dj" only deletes first line of closed fold
Commit: https://github.com/vim/vim/commit/3b68123cd271fb781da4055cf1a1cf52f4fee6a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 13 19:35:55 2019 +0100
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 https://github.com/vim/vim/issues/5354)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 13 Dec 2019 19:45:04 +0100 |
parents | 90b0af9ba4ff |
children | 49694eceaa55 |
line wrap: on
line diff
--- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -769,3 +769,28 @@ func Test_fold_delete_with_marker_and_wh 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