vim-patch:8.2.2772: problems when restoring 'runtimepath' from a session file

Problem:    Problems when restoring 'runtimepath' from a session file.
Solution:   Add the "skiprtp" item in 'sessionoptions'.
635bd60804

Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.

Omit vim9 test, Test_mksession_skiprtp().
This commit is contained in:
Jan Edmund Lazo
2021-05-22 15:01:08 -04:00
parent 8e5439182b
commit 8415615b59
5 changed files with 19 additions and 3 deletions

View File

@@ -937,8 +937,13 @@ void ex_mkrc(exarg_T *eap)
if (!view_session || (eap->cmdidx == CMD_mksession
&& (*flagp & SSOP_OPTIONS))) {
int flags = OPT_GLOBAL;
if (eap->cmdidx == CMD_mksession && (*flagp & SSOP_SKIP_RTP)) {
flags |= OPT_SKIPRTP;
}
failed |= (makemap(fd, NULL) == FAIL
|| makeset(fd, OPT_GLOBAL, false) == FAIL);
|| makeset(fd, flags, false) == FAIL);
}
if (!failed && view_session) {