Patch 8.2.2778
Problem:    Problem restoring 'packpath' in session.
Solution:   Let "skiprtp" also apply to 'packpath'.
Files:      runtime/doc/options.txt, src/option.c,
            src/testdir/test_mksession.vim


*** ../vim-8.2.2777/runtime/doc/options.txt     2021-04-16 19:58:15.911249735 
+0200
--- runtime/doc/options.txt     2021-04-17 21:01:27.719240983 +0200
***************
*** 6507,6513 ****
                        global values for local options)
           options      all options and mappings (also global values for local
                        options)
!          skiprtp      exclude 'runtimepath' from the options
           resize       size of the Vim window: 'lines' and 'columns'
           sesdir       the directory in which the session file is located
                        will become the current directory (useful with
--- 6511,6517 ----
                        global values for local options)
           options      all options and mappings (also global values for local
                        options)
!          skiprtp      exclude 'runtimepath' and 'packpath' from the options
           resize       size of the Vim window: 'lines' and 'columns'
           sesdir       the directory in which the session file is located
                        will become the current directory (useful with
*** ../vim-8.2.2777/src/option.c        2021-04-16 19:58:15.915249728 +0200
--- src/option.c        2021-04-17 20:59:32.247641562 +0200
***************
*** 4615,4621 ****
            if ((opt_flags & OPT_GLOBAL) && optval_default(p, varp, p_cp))
                continue;
  
!           if ((opt_flags & OPT_SKIPRTP) && p->var == (char_u *)&p_rtp)
                continue;
  
            round = 2;
--- 4615,4622 ----
            if ((opt_flags & OPT_GLOBAL) && optval_default(p, varp, p_cp))
                continue;
  
!           if ((opt_flags & OPT_SKIPRTP) && (p->var == (char_u *)&p_rtp
!                                                || p->var == (char_u *)&p_pp))
                continue;
  
            round = 2;
*** ../vim-8.2.2777/src/testdir/test_mksession.vim      2021-04-17 
18:38:49.888758511 +0200
--- src/testdir/test_mksession.vim      2021-04-17 21:03:38.838800080 +0200
***************
*** 133,153 ****
  
  def Test_mksession_skiprtp()
    mksession! Xtest_mks.out
!   var found = 0
    for line in readfile('Xtest_mks.out')
      if line =~ 'set runtimepath'
!       found = 1
!       break
      endif
    endfor
!   assert_equal(1, found)
    delete('Xtest_mks.out')
  
    set sessionoptions+=skiprtp
    mksession! Xtest_mks.out
!   found = 0
    for line in readfile('Xtest_mks.out')
!     if line =~ 'set runtimepath'
        found = 1
        break
      endif
--- 133,157 ----
  
  def Test_mksession_skiprtp()
    mksession! Xtest_mks.out
!   var found_rtp = 0
!   var found_pp = 0
    for line in readfile('Xtest_mks.out')
      if line =~ 'set runtimepath'
!       found_rtp += 1
!     endif
!     if line =~ 'set packpath'
!       found_pp += 1
      endif
    endfor
!   assert_equal(1, found_rtp)
!   assert_equal(1, found_pp)
    delete('Xtest_mks.out')
  
    set sessionoptions+=skiprtp
    mksession! Xtest_mks.out
!   var found = 0
    for line in readfile('Xtest_mks.out')
!     if line =~ 'set \(runtimepath\|packpath\)'
        found = 1
        break
      endif
*** ../vim-8.2.2777/src/version.c       2021-04-17 20:44:52.442520718 +0200
--- src/version.c       2021-04-17 21:01:01.867329554 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2778,
  /**/

-- 
Two percent of zero is almost nothing.

 /// 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/202104171905.13HJ53id125199%40masaka.moolenaar.net.

Raspunde prin e-mail lui