mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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".
This commit is contained in:
@@ -2683,7 +2683,7 @@ eval_variable(
|
||||
char_u *p = STRNCMP(name, "s:", 2) == 0 ? name + 2 : name;
|
||||
|
||||
if (sid == 0)
|
||||
import = find_imported(p, 0, NULL);
|
||||
import = find_imported(p, 0, TRUE, NULL);
|
||||
|
||||
// imported variable from another script
|
||||
if (import != NULL || sid != 0)
|
||||
@@ -3015,7 +3015,7 @@ lookup_scriptitem(
|
||||
res = HASHITEM_EMPTY(hi) ? FAIL : OK;
|
||||
|
||||
// if not script-local, then perhaps imported
|
||||
if (res == FAIL && find_imported(p, 0, NULL) != NULL)
|
||||
if (res == FAIL && find_imported(p, 0, FALSE, NULL) != NULL)
|
||||
res = OK;
|
||||
if (p != buffer)
|
||||
vim_free(p);
|
||||
@@ -3388,7 +3388,7 @@ set_var_const(
|
||||
|
||||
if (di == NULL && var_in_vim9script)
|
||||
{
|
||||
imported_T *import = find_imported(varname, 0, NULL);
|
||||
imported_T *import = find_imported(varname, 0, FALSE, NULL);
|
||||
|
||||
if (import != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user