From f0e7e6365e86ca42c177fe165d3097d1bfb35f72 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 21 Jan 2022 13:29:56 +0000 Subject: 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) --- src/option.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/option.c') diff --git a/src/option.c b/src/option.c index ff539683e..2ec6ed552 100644 --- a/src/option.c +++ b/src/option.c @@ -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; -- cgit v1.2.1