To: vim_dev@googlegroups.com Subject: Patch 8.2.5132 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.5132 Problem: :mkview test doesn't test much. Solution: Save the view with the folds closed. (James McCoy, closes #10596) Files: src/testdir/test_mksession.vim *** ../vim-8.2.5131/src/testdir/test_mksession.vim 2022-05-18 22:07:44.079562195 +0100 --- src/testdir/test_mksession.vim 2022-06-19 17:12:39.217161294 +0100 *************** *** 583,603 **** call append(0, ['a', 'b', 'c']) 1,3fold " zR affects 'foldlevel', make sure the option is applied after the folds " have been recreated. normal zR - write! Xtestfile call assert_equal(-1, foldclosed(1)) call assert_equal(-1, foldclosed(2)) call assert_equal(-1, foldclosed(3)) - mkview! Xtestview source Xtestview ! call assert_equal(-1, foldclosed(1)) ! call assert_equal(-1, foldclosed(2)) ! call assert_equal(-1, foldclosed(3)) call delete('Xtestview') call delete('Xtestfile') --- 583,611 ---- call append(0, ['a', 'b', 'c']) 1,3fold + write! Xtestfile + + call assert_notequal(-1, foldclosed(1)) + call assert_notequal(-1, foldclosed(2)) + call assert_notequal(-1, foldclosed(3)) + + " Save the view with folds closed + mkview! Xtestview + " zR affects 'foldlevel', make sure the option is applied after the folds " have been recreated. + " Open folds to ensure they get closed when restoring the view normal zR call assert_equal(-1, foldclosed(1)) call assert_equal(-1, foldclosed(2)) call assert_equal(-1, foldclosed(3)) source Xtestview ! call assert_notequal(-1, foldclosed(1)) ! call assert_notequal(-1, foldclosed(2)) ! call assert_notequal(-1, foldclosed(3)) call delete('Xtestview') call delete('Xtestfile') *** ../vim-8.2.5131/src/version.c 2022-06-19 17:05:43.841167033 +0100 --- src/version.c 2022-06-19 17:15:16.349136072 +0100 *************** *** 736,737 **** --- 736,739 ---- { /* Add new patch number below this line */ + /**/ + 5132, /**/ -- BLACK KNIGHT: None shall pass. ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross this bridge. BLACK KNIGHT: Then you shall die. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///