mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"
Problem: Vim9: cannot find Name.Func from "import * as Name". (Alexander Goussas) Solution: When no variable found try finding a function. (closes #8045) Check that the function was exported.
This commit is contained in:
@@ -298,8 +298,7 @@ find_exported(
|
||||
svar_T *sv;
|
||||
scriptitem_T *script = SCRIPT_ITEM(sid);
|
||||
|
||||
// find name in "script"
|
||||
// TODO: also find script-local user function
|
||||
// Find name in "script".
|
||||
idx = get_script_item_idx(sid, name, 0, cctx);
|
||||
if (idx >= 0)
|
||||
{
|
||||
@@ -341,6 +340,13 @@ find_exported(
|
||||
semsg(_(e_item_not_found_in_script_str), name);
|
||||
return -1;
|
||||
}
|
||||
else if (((*ufunc)->uf_flags & FC_EXPORT) == 0)
|
||||
{
|
||||
if (verbose)
|
||||
semsg(_(e_item_not_exported_in_script_str), name);
|
||||
*ufunc = NULL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return idx;
|
||||
|
Reference in New Issue
Block a user