From 12eb2eb4d78828513d91e04b0e69550ed37a5932 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 15 Apr 2022 22:57:09 +0100 Subject: patch 8.2.4755: cannot use FuncRef in completion spec Problem: Cannot use FuncRef in completion spec. Solution: Dereference a function name in another way. (closes #10197) --- src/eval.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 90ed14b60..cad688775 100644 --- a/src/eval.c +++ b/src/eval.c @@ -639,7 +639,15 @@ deref_function_name( ref.v_type = VAR_UNKNOWN; if (eval7(arg, &ref, evalarg, FALSE) == FAIL) - return NULL; + { + dictitem_T *v; + + // If VarName was used it would not be found, try another way. + v = find_var_also_in_script(name, NULL, FALSE); + if (v == NULL) + return NULL; + copy_tv(&v->di_tv, &ref); + } if (*skipwhite(*arg) != NUL) { if (verbose) -- cgit v1.2.1