diff src/option.c @ 16223:abb67309c1ca v8.1.1116

patch 8.1.1116: cannot enforce a Vim script style commit https://github.com/vim/vim/commit/558ca4ae55096f8763ab8515a304cda9c57f18a7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 4 18:15:38 2019 +0200 patch 8.1.1116: cannot enforce a Vim script style Problem: Cannot enforce a Vim script style. Solution: Add the :scriptversion command. (closes https://github.com/vim/vim/issues/3857)
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Apr 2019 18:30:05 +0200
parents cd5c83115ec6
children 5ef25fa57f71
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -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);
 	}