aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-05 20:04:35 +0200
committerGitHub <noreply@github.com>2019-05-05 20:04:35 +0200
commit8a1880f04109b2043efdd4c53f5b24cadf511c69 (patch)
tree1479322cdf125176ac145dc3cc6a8f5fb151a59e /src/nvim/buffer.c
parent9d6c205a339f0926bdf6cf9312e1db40642df259 (diff)
parentfb02e9f1e95a72cc7e09465d706f67652ff3bb5e (diff)
downloadrneovim-8a1880f04109b2043efdd4c53f5b24cadf511c69.tar.gz
rneovim-8a1880f04109b2043efdd4c53f5b24cadf511c69.tar.bz2
rneovim-8a1880f04109b2043efdd4c53f5b24cadf511c69.zip
Merge #9972 from janlazo/vim-8.1.1249
vim-patch:8.1.{613,1046,1249}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index c8ed7d0b37..cdb226b94d 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -5112,14 +5112,15 @@ chk_modeline(
*e = NUL; // truncate the set command
if (*s != NUL) { // skip over an empty "::"
+ const int secure_save = secure;
save_SID = current_SID;
current_SID = SID_MODELINE;
// Make sure no risky things are executed as a side effect.
- secure++;
+ secure = 1;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
- secure--;
+ secure = secure_save;
current_SID = save_SID;
if (retval == FAIL) { // stop if error found
break;