0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4174: Vim9: can use an autoload name in normal script

Problem:    Vim9: can use an autoload name in normal script.
Solution:   Disallow using an autoload name.
This commit is contained in:
Bram Moolenaar
2022-01-21 20:37:05 +00:00
parent e70dd11ef4
commit 19e69a6330
4 changed files with 22 additions and 1 deletions

View File

@@ -4495,6 +4495,12 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
}
}
}
else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
{
semsg(_(e_using_autoload_name_in_non_autoload_script_str),
name);
goto erret;
}
}
if (var_conflict)
{