diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-22 15:01:08 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-22 15:40:06 -0400 |
commit | 8415615b593c6673083a5004d5db9e8af4914726 (patch) | |
tree | e58158e11b6f33344aebf04c0b3b8a914b15b7c1 /src/nvim/ex_session.c | |
parent | 8e5439182b0c62c433b0696d85e033ffc7404e0c (diff) | |
download | rneovim-8415615b593c6673083a5004d5db9e8af4914726.tar.gz rneovim-8415615b593c6673083a5004d5db9e8af4914726.tar.bz2 rneovim-8415615b593c6673083a5004d5db9e8af4914726.zip |
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'.
https://github.com/vim/vim/commit/635bd60804966803490287e97460ecdc91d5fe0a
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().
Diffstat (limited to 'src/nvim/ex_session.c')
-rw-r--r-- | src/nvim/ex_session.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index c22c1f428d..c1e52d6994 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -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) { |