diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-29 21:45:34 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-29 21:45:34 +0000 |
commit | 62aec93bfdb9e1b40d03a6d2e8e9511f8b1bdb2d (patch) | |
tree | 8f2962626c458f5ac5fa1f2ec46e79248683c81d /src/evalfunc.c | |
parent | 135e15251efd96c960e51e8ab31333c2d6887983 (diff) |
patch 8.2.4257: Vim9: finding global function without g: prefix inconsistentv8.2.4257
Problem: Vim9: finding global function without g: prefix but not finding
global variable is inconsistent.
Solution: Require using g: for a global function. Change the vim9.vim
script into a Vim9 script with exports. Fix that import in legacy
script does not work.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index cb5fcfe025..711e2e6c0a 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3830,14 +3830,7 @@ f_exists(typval_T *argvars, typval_T *rettv) } else if (*p == '*') // internal or user defined function { - int save_version = current_sctx.sc_version; - - // Vim9 script assumes a function is script-local, but here we want to - // find any matching function. - if (current_sctx.sc_version == SCRIPT_VERSION_VIM9) - current_sctx.sc_version = SCRIPT_VERSION_MAX; n = function_exists(p + 1, FALSE); - current_sctx.sc_version = save_version; } else if (*p == '?') // internal function only { |