0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.1116: cannot enforce a Vim script style

Problem:    Cannot enforce a Vim script style.
Solution:   Add the :scriptversion command. (closes #3857)
This commit is contained in:
Bram Moolenaar
2019-04-04 18:15:38 +02:00
parent 8f4aeb5572
commit 558ca4ae55
14 changed files with 177 additions and 32 deletions

View File

@@ -407,7 +407,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, 0}
# define SCTX_INIT , {0, 0, 0, 1}
#else
# define SCTX_INIT
#endif
@@ -5911,6 +5911,7 @@ set_string_option_direct(
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);
}