diff options
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 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 <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) |