diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-02-20 15:19:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-02-20 15:19:43 +0100 |
commit | 2142e5d85112f37e68374c81612d6277c6aaaf0b (patch) | |
tree | 51961c2d01a55f7523cc24ebdef7e61668e94eb5 /src/eval.c | |
parent | 452ff5bdc780029912387819bb50c7c2031344f1 (diff) | |
download | vim-2142e5d85112f37e68374c81612d6277c6aaaf0b.zip |
updated for version 7.3.824
Problem: Can redefine builtin functions. (ZyX)
Solution: Disallow adding a function to g:.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 106f1c57e..bc41805e9 100644 --- a/src/eval.c +++ b/src/eval.c @@ -21164,6 +21164,9 @@ ex_function(eap) if (arg[j] != NUL) emsg_funcname((char *)e_invarg2, arg); } + /* Disallow using the g: dict. */ + if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE) + EMSG(_("E862: Cannot use g: here")); } /* |