patch 8.1.0515: reloading a script gives errors for existing functions
Problem: Reloading a script gives errors for existing functions.
Solution: Allow redefining a function once when reloading a script.
diff --git a/src/option.c b/src/option.c
index 3c54ab6..a4a9c97 100644
--- a/src/option.c
+++ b/src/option.c
@@ -415,7 +415,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}
+# define SCTX_INIT , {0, 0, 0}
#else
# define SCTX_INIT
#endif
@@ -5959,6 +5959,7 @@
else
{
script_ctx.sc_sid = set_sid;
+ script_ctx.sc_seq = 0;
script_ctx.sc_lnum = 0;
}
set_option_sctx_idx(idx, opt_flags, script_ctx);