aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-03-01 23:23:50 -0800
committerGitHub <noreply@github.com>2020-03-01 23:23:50 -0800
commit0110735547bc5a491eff195096ba93e3ddefb19f (patch)
treeaad45b055941ef137d86494b534a7b53e5ac38ec /src/nvim/ex_docmd.c
parent5e0c435ca1b711e80f78429431b4d400d789c618 (diff)
parentf1923d4b92239ef2ca280bf1ce6c5f6cc7cb4f1a (diff)
downloadrneovim-0110735547bc5a491eff195096ba93e3ddefb19f.tar.gz
rneovim-0110735547bc5a491eff195096ba93e3ddefb19f.tar.bz2
rneovim-0110735547bc5a491eff195096ba93e3ddefb19f.zip
Merge #11929 from janlazo/vim-8.1.1510
vim-patch:8.0.1587,8.1.{253,881,883,885,896,939,1107,1108,1466,1489,1510,1552,1642,1793},8.2.{108,133,135}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 28ecaf684a..abe394dc3a 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1783,10 +1783,14 @@ static char_u * do_one_cmd(char_u **cmdlinep,
if (!ea.skip) {
if (sandbox != 0 && !(ea.argt & SBOXOK)) {
- /* Command not allowed in sandbox. */
+ // Command not allowed in sandbox.
errormsg = (char_u *)_(e_sandbox);
goto doend;
}
+ if (restricted != 0 && (ea.argt & RESTRICT)) {
+ errormsg = (char_u *)_("E981: Command not allowed in restricted mode");
+ goto doend;
+ }
if (!MODIFIABLE(curbuf) && (ea.argt & MODIFY)
// allow :put in terminals
&& (!curbuf->terminal || ea.cmdidx != CMD_put)) {