aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-05 11:38:34 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-05 11:40:19 -0400
commitfb02e9f1e95a72cc7e09465d706f67652ff3bb5e (patch)
treea581e87305f71f72d13e9568b610eafc3ad45fed /src/nvim/option.c
parent9c6476d81e47f886e448579261192db6c9a92135 (diff)
downloadrneovim-fb02e9f1e95a72cc7e09465d706f67652ff3bb5e.tar.gz
rneovim-fb02e9f1e95a72cc7e09465d706f67652ff3bb5e.tar.bz2
rneovim-fb02e9f1e95a72cc7e09465d706f67652ff3bb5e.zip
vim-patch:8.1.1046: the "secure" variable is used inconsistently
Problem: the "secure" variable is used inconsistently. (Justin M. Keyes) Solution: Set it to one instead of incrementing. https://github.com/vim/vim/commit/82b033eff82d3ed0da77fd5f5a1c023766acabba
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index b93f98f6c5..743f6c8311 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1840,11 +1840,10 @@ int do_set(
// effects in secure mode. Also when the value was
// set with the P_INSECURE flag and is not
// completely replaced.
- if (secure
+ if ((opt_flags & OPT_MODELINE)
|| sandbox != 0
- || (opt_flags & OPT_MODELINE)
|| (!value_is_replaced && (*p & P_INSECURE))) {
- secure++;
+ secure = 1;
}
// Handle side effects, and set the global value