diff src/structs.h @ 28249:4b322951ebac v8.2.4650

patch 8.2.4650: "import autoload" only works with using 'runtimepath' Commit: https://github.com/vim/vim/commit/c0ceeeb839b8c6bebd3a2abd1c07d40ec3c6edca Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 30 21:12:27 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Mar 2022 22:15:04 +0200
parents 85b07a942518
children 20f6b0cdf38c
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -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