diff src/userfunc.c @ 27043:15f40772e10a v8.2.4050

patch 8.2.4050: Vim9: need to prefix every item in an autoload script Commit: https://github.com/vim/vim/commit/dc4451df61a6aa12a0661817b7094fb32f09e11d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 9 21:36:37 2022 +0000 patch 8.2.4050: Vim9: need to prefix every item in an autoload script Problem: Vim9: need to prefix every item in an autoload script. Solution: First step in supporting "vim9script autoload" and "import autoload".
author Bram Moolenaar <Bram@vim.org>
date Sun, 09 Jan 2022 22:45:04 +0100
parents c9474ae175f4
children 140102677c12
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1608,7 +1608,7 @@ deref_func_name(
 	    p = name + 2;
 	    len -= 2;
 	}
-	import = find_imported(p, len, NULL);
+	import = find_imported(p, len, FALSE, NULL);
 
 	// imported function from another script
 	if (import != NULL)
@@ -4079,6 +4079,9 @@ define_function(exarg_T *eap, char_u *na
 	    else
 		eap->skip = TRUE;
 	}
+
+//	if (is_export)
+//	    name = may_prefix_autoload(name);
     }
 
     // An error in a function call during evaluation of an expression in magic
@@ -4363,7 +4366,7 @@ define_function(exarg_T *eap, char_u *na
 	{
 	    char_u *uname = untrans_function_name(name);
 
-	    import = find_imported(uname == NULL ? name : uname, 0, NULL);
+	    import = find_imported(uname == NULL ? name : uname, 0, FALSE, NULL);
 	}
 
 	if (fp != NULL || import != NULL)