summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-21 13:03:28 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-21 13:03:28 +0100
commit48f377a476e4a3312aa0e3535aba170484b59483 (patch)
tree6ce6c59efdaa4029fa21168d6f561039711b45d6 /src/buffer.c
parent9d302ad4e31b4e20ce0b3af700f43edb6f5e6036 (diff)
patch 8.1.0613: when executing an insecure function the secure flag is stuckv8.1.0613
Problem: When executing an insecure function the secure flag is stuck. (Gabriel Barta) Solution: Restore "secure" instead of decrementing it. (closes #3705)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index bb940691c3..66068d9637 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5519,6 +5519,7 @@ chk_modeline(
if (*s != NUL) /* skip over an empty "::" */
{
+ int secure_save = secure;
#ifdef FEAT_EVAL
save_current_sctx = current_sctx;
current_sctx.sc_sid = SID_MODELINE;
@@ -5530,7 +5531,7 @@ chk_modeline(
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
- --secure;
+ secure = secure_save;
#ifdef FEAT_EVAL
current_sctx = save_current_sctx;
#endif