aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-11-17 08:47:41 -0700
committerGitHub <noreply@github.com>2022-11-17 08:47:41 -0700
commit32cba4cee6c2ca232b5def16fe1bae8166d093f1 (patch)
tree31cb31b570e2263250471ea2ee08be1b41ac8d31 /src/nvim/ex_cmds.c
parent9736605672e8648bbe8739a6fdd1c315183bce40 (diff)
parent6d9c3d903ecee2d1d21d0a0806f1a2bebe628e8e (diff)
downloadrneovim-32cba4cee6c2ca232b5def16fe1bae8166d093f1.tar.gz
rneovim-32cba4cee6c2ca232b5def16fe1bae8166d093f1.tar.bz2
rneovim-32cba4cee6c2ca232b5def16fe1bae8166d093f1.zip
Merge pull request #20956 from gpanders/lua-readsecure
feat: implement vim.secure.read() and use it for 'exrc'
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index c6dd30e549..1efde7ef3f 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1134,8 +1134,7 @@ void do_bang(int addr_count, exarg_T *eap, bool forceit, bool do_in, bool do_out
int scroll_save = msg_scroll;
//
- // Disallow shell commands from .exrc and .vimrc in current directory for
- // security reasons.
+ // Disallow shell commands in secure mode
//
if (check_secure()) {
return;
@@ -1477,8 +1476,7 @@ filterend:
/// @param flags may be SHELL_DOOUT when output is redirected
void do_shell(char *cmd, int flags)
{
- // Disallow shell commands from .exrc and .vimrc in current directory for
- // security reasons.
+ // Disallow shell commands in secure mode
if (check_secure()) {
msg_end();
return;
@@ -3215,8 +3213,7 @@ void ex_z(exarg_T *eap)
ex_no_reprint = true;
}
-/// @return true if the secure flag is set (.exrc or .vimrc in current directory)
-/// and also give an error message.
+/// @return true if the secure flag is set and also give an error message.
/// Otherwise, return false.
bool check_secure(void)
{