0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4650: "import autoload" only works with using 'runtimepath'

Problem:    "import autoload" only works with using 'runtimepath'.
Solution:   Also support a relative and absolute file name.
This commit is contained in:
Bram Moolenaar
2022-03-30 21:12:27 +01:00
parent b4ad3b0dea
commit c0ceeeb839
15 changed files with 442 additions and 82 deletions

View File

@@ -1833,7 +1833,7 @@ typedef struct {
*/
typedef struct
{
char_u *sn_name;
char_u *sn_name; // full path of script file
int sn_script_seq; // latest sctx_T sc_seq value
// "sn_vars" stores the s: variables currently valid. When leaving a block
@@ -1864,9 +1864,12 @@ typedef struct
char_u *sn_save_cpo; // 'cpo' value when :vim9script found
char sn_is_vimrc; // .vimrc file, do not restore 'cpo'
// for "vim9script autoload" this is "dir#scriptname#"
// for a Vim9 script under "rtp/autoload/" this is "dir#scriptname#"
char_u *sn_autoload_prefix;
// TRUE for a script used with "import autoload './dirname/script.vim'"
int sn_import_autoload;
# ifdef FEAT_PROFILE
int sn_prof_on; // TRUE when script is/was profiled
int sn_pr_force; // forceit: profile functions in this script