diff src/option.c @ 24464:a56f9c2ba51c v8.2.2772

patch 8.2.2772: problems when restoring 'runtimepath' from a session file Commit: https://github.com/vim/vim/commit/635bd60804966803490287e97460ecdc91d5fe0a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 16 19:58:22 2021 +0200 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'.
author Bram Moolenaar <Bram@vim.org>
date Fri, 16 Apr 2021 20:00:05 +0200
parents a9ff8368d35f
children e79d1475fc89
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -4615,6 +4615,9 @@ 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)
+		continue;
+
 	    round = 2;
 	    if (p->indir != PV_NONE)
 	    {