patch 8.1.1116: cannot enforce a Vim script style
Problem: Cannot enforce a Vim script style.
Solution: Add the :scriptversion command. (closes #3857)
diff --git a/src/option.c b/src/option.c
index d1fdcc1..4564395 100644
--- a/src/option.c
+++ b/src/option.c
@@ -407,7 +407,7 @@
char_u *def_val[2]; // default values for variable (vi and vim)
#ifdef FEAT_EVAL
sctx_T script_ctx; // script context where the option was last set
-# define SCTX_INIT , {0, 0, 0}
+# define SCTX_INIT , {0, 0, 0, 1}
#else
# define SCTX_INIT
#endif
@@ -5911,6 +5911,7 @@
script_ctx.sc_sid = set_sid;
script_ctx.sc_seq = 0;
script_ctx.sc_lnum = 0;
+ script_ctx.sc_version = 1;
}
set_option_sctx_idx(idx, opt_flags, script_ctx);
}