0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-11-10 17:33:29 +01:00
parent 1bbb619483
commit ded5f1bed7
10 changed files with 55 additions and 11 deletions

View File

@@ -415,7 +415,7 @@ struct vimoption
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 @@ set_string_option_direct(
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);