diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-10 18:08:00 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-10 18:08:00 +0000 |
commit | fe2ef0b2cda0b25c45bd9e320f8b77931ee8ef2e (patch) | |
tree | 715e146b05792ed452a39ffa97e1e89f68463689 /src/proto | |
parent | ee63031b572eb7aea27be4c7e3dafba0daaf681b (diff) | |
download | vim-git-fe2ef0b2cda0b25c45bd9e320f8b77931ee8ef2e.tar.gz |
patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yetv8.2.4053
Problem: Vim9: autoload mechanism doesn't fully work yet.
Solution: Define functions and variables with their autoload name, add the
prefix when calling a function, find the variable in the table of
script variables.
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/scriptfile.pro | 1 | ||||
-rw-r--r-- | src/proto/vim9script.pro | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/proto/scriptfile.pro b/src/proto/scriptfile.pro index 140d67bbb..477dc3e6e 100644 --- a/src/proto/scriptfile.pro +++ b/src/proto/scriptfile.pro @@ -38,6 +38,7 @@ void ex_finish(exarg_T *eap); void do_finish(exarg_T *eap, int reanimate); int source_finished(char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie); char_u *script_name_after_autoload(scriptitem_T *si); +char_u *get_autoload_prefix(scriptitem_T *si); char_u *may_prefix_autoload(char_u *name); char_u *autoload_name(char_u *name); int script_autoload(char_u *name, int reload); diff --git a/src/proto/vim9script.pro b/src/proto/vim9script.pro index 264482493..46211ddb0 100644 --- a/src/proto/vim9script.pro +++ b/src/proto/vim9script.pro @@ -13,7 +13,7 @@ void mark_imports_for_reload(int sid); void ex_import(exarg_T *eap); int find_exported(int sid, char_u *name, ufunc_T **ufunc, type_T **type, cctx_T *cctx, int verbose); char_u *vim9_declare_scriptvar(exarg_T *eap, char_u *arg); -void update_vim9_script_var(int create, dictitem_T *di, int flags, typval_T *tv, type_T **type, int do_member); +void update_vim9_script_var(int create, dictitem_T *di, char_u *name, int flags, typval_T *tv, type_T **type, int do_member); void hide_script_var(scriptitem_T *si, int idx, int func_defined); svar_T *find_typval_in_script(typval_T *dest, scid_T sid); int check_script_var_type(svar_T *sv, typval_T *value, char_u *name, where_T where); |