Mercurial > vim
changeset 24476:e79d1475fc89 v8.2.2778
patch 8.2.2778: problem restoring 'packpath' in session
Commit: https://github.com/vim/vim/commit/d23b714d8b9ed8e16ef553098acc6da0979e94fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 17 21:04:34 2021 +0200
patch 8.2.2778: problem restoring 'packpath' in session
Problem: Problem restoring 'packpath' in session.
Solution: Let "skiprtp" also apply to 'packpath'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Apr 2021 21:15:03 +0200 |
parents | 96905804bf5a |
children | 150cc0a3a8d4 |
files | runtime/doc/options.txt src/option.c src/testdir/test_mksession.vim src/version.c |
diffstat | 4 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6511,7 +6511,7 @@ A jump table for the options with a shor global values for local options) options all options and mappings (also global values for local options) - skiprtp exclude 'runtimepath' from the 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
--- a/src/option.c +++ b/src/option.c @@ -4615,7 +4615,8 @@ makeset(FILE *fd, int opt_flags, int loc if ((opt_flags & OPT_GLOBAL) && optval_default(p, varp, p_cp)) continue; - if ((opt_flags & OPT_SKIPRTP) && p->var == (char_u *)&p_rtp) + if ((opt_flags & OPT_SKIPRTP) && (p->var == (char_u *)&p_rtp + || p->var == (char_u *)&p_pp)) continue; round = 2;
--- a/src/testdir/test_mksession.vim +++ b/src/testdir/test_mksession.vim @@ -133,21 +133,25 @@ endfunc def Test_mksession_skiprtp() mksession! Xtest_mks.out - var found = 0 + var found_rtp = 0 + var found_pp = 0 for line in readfile('Xtest_mks.out') if line =~ 'set runtimepath' - found = 1 - break + found_rtp += 1 + endif + if line =~ 'set packpath' + found_pp += 1 endif endfor - assert_equal(1, found) + assert_equal(1, found_rtp) + assert_equal(1, found_pp) delete('Xtest_mks.out') set sessionoptions+=skiprtp mksession! Xtest_mks.out - found = 0 + var found = 0 for line in readfile('Xtest_mks.out') - if line =~ 'set runtimepath' + if line =~ 'set \(runtimepath\|packpath\)' found = 1 break endif