0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4171: cannot invoke option function using autoload import

Problem:    Cannot invoke option function using autoload import.
Solution:   Expand the import to an autoload function name. (closes #9578)
This commit is contained in:
Bram Moolenaar
2022-01-21 13:29:56 +00:00
parent b7057bdd09
commit f0e7e6365e
6 changed files with 92 additions and 11 deletions

View File

@@ -7238,6 +7238,11 @@ option_set_callback_func(char_u *optval UNUSED, callback_T *optcb UNUSED)
free_callback(optcb);
set_callback(optcb, &cb);
free_tv(tv);
// when using Vim9 style "import.funcname" it needs to be expanded to
// "import#funcname".
expand_autload_callback(optcb);
return OK;
#else
return FAIL;