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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220619161805.51E331C075E%40moolenaar.net.

Raspunde prin e-mail lui