summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-17 21:04:34 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-17 21:04:34 +0200
commitd23b714d8b9ed8e16ef553098acc6da0979e94fc (patch)
treef41d4d0132086a7114369a70cce3ad6d3ebc7292 /src
parent51e933261b984db014e858d79387a826d2626fb6 (diff)
patch 8.2.2778: problem restoring 'packpath' in sessionv8.2.2778
Problem: Problem restoring 'packpath' in session. Solution: Let "skiprtp" also apply to 'packpath'.
Diffstat (limited to 'src')
-rw-r--r--src/option.c3
-rw-r--r--src/testdir/test_mksession.vim16
-rw-r--r--src/version.c2
3 files changed, 14 insertions, 7 deletions
diff --git a/src/option.c b/src/option.c
index d7997b0646..3c248c1931 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4615,7 +4615,8 @@ makeset(FILE *fd, int opt_flags, int local_only)
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;
diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim
index 25c508102b..045aa2de0a 100644
--- 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
diff --git a/src/version.c b/src/version.c
index 17afa34a6a..83d7e57256 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2778,
+/**/
2777,
/**/
2776,