0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.4308: Vim9: cannot list autoload function

Problem:    Vim9: cannot list autoload function.
Solution:   Don't give an error for using # when listing a function.
            (closes #9703)
This commit is contained in:
Bram Moolenaar
2022-02-06 13:08:41 +00:00
parent 0c1550d9e9
commit 8164f6ea3c
3 changed files with 7 additions and 1 deletions

View File

@@ -1886,6 +1886,10 @@ def Test_vim9script_autoload_call()
assert_equal('other', g:result) assert_equal('other', g:result)
assert_equal('arg', call('another.RetArg', ['arg'])) assert_equal('arg', call('another.RetArg', ['arg']))
verbose function another.Getother
# should we disallow this?
verbose function another#Getother
END END
v9.CheckScriptSuccess(lines) v9.CheckScriptSuccess(lines)

View File

@@ -4232,7 +4232,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
name = prefixed; name = prefixed;
} }
} }
else if (vim9script && name != NULL else if (paren && vim9script && name != NULL
&& vim_strchr(name, AUTOLOAD_CHAR) != NULL) && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
{ {
emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead)); emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead));

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4308,
/**/ /**/
4307, 4307,
/**/ /**/