aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 22ffd67fdd..e1835a9b78 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1093,9 +1093,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
int save_msg_scroll = msg_scroll;
int save_msg_silent = -1;
int did_esilent = 0;
-#ifdef HAVE_SANDBOX
int did_sandbox = FALSE;
-#endif
cmdmod_T save_cmdmod;
int ni; /* set when Not Implemented */
@@ -1240,11 +1238,9 @@ static char_u * do_one_cmd(char_u **cmdlinep,
continue;
case 's': if (checkforcmd(&ea.cmd, "sandbox", 3)) {
-#ifdef HAVE_SANDBOX
if (!did_sandbox)
++sandbox;
did_sandbox = TRUE;
-#endif
continue;
}
if (!checkforcmd(&ea.cmd, "silent", 3))
@@ -1509,13 +1505,11 @@ static char_u * do_one_cmd(char_u **cmdlinep,
}
if (!ea.skip) {
-#ifdef HAVE_SANDBOX
if (sandbox != 0 && !(ea.argt & SBOXOK)) {
/* Command not allowed in sandbox. */
errormsg = (char_u *)_(e_sandbox);
goto doend;
}
-#endif
if (!curbuf->b_p_ma && (ea.argt & MODIFY)) {
/* Command not allowed in non-'modifiable' buffer */
errormsg = (char_u *)_(e_modifiable);
@@ -1983,10 +1977,8 @@ doend:
msg_col = 0;
}
-#ifdef HAVE_SANDBOX
if (did_sandbox)
--sandbox;
-#endif
if (ea.nextcmd && *ea.nextcmd == NUL) /* not really a next command */
ea.nextcmd = NULL;