Mercurial > vim
diff src/option.c @ 15008:67e3103d6e18 v8.1.0515
patch 8.1.0515: reloading a script gives errors for existing functions
commit https://github.com/vim/vim/commit/ded5f1bed7ff2d138b3ee0f9610d17290b62692d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 10 17:33:29 2018 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 10 Nov 2018 17:45:06 +0100 |
parents | 0058cdd5b752 |
children | a751ecdd07cc |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -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);