diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-15 22:57:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-15 22:57:09 +0100 |
commit | 12eb2eb4d78828513d91e04b0e69550ed37a5932 (patch) | |
tree | 87ca8d96cf92c7864816df4a36987c24b293ebc9 /src/eval.c | |
parent | 7714231bb5b15f7c85453f3945c108478de1d08a (diff) |
patch 8.2.4755: cannot use <SID>FuncRef in completion specv8.2.4755
Problem: Cannot use <SID>FuncRef in completion spec.
Solution: Dereference a function name in another way. (closes #10197)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 90ed14b608..cad6887751 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 <SID>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) |