diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-16 18:30:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 18:30:56 +0100 |
commit | 8d00393d0cc89511867861dc8ac5cc7b068f9f69 (patch) | |
tree | 78172ff8f0933dc9598f271d3ca863937c561580 /src/nvim/eval.c | |
parent | 175398f21645552b708a7626309b826ae0f3d8a8 (diff) | |
parent | 3bad76008e1c98724eca7d986a6340eff1de8193 (diff) | |
download | rneovim-8d00393d0cc89511867861dc8ac5cc7b068f9f69.tar.gz rneovim-8d00393d0cc89511867861dc8ac5cc7b068f9f69.tar.bz2 rneovim-8d00393d0cc89511867861dc8ac5cc7b068f9f69.zip |
Merge #9736 from janlazo/vim-8.1.0019
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5ef2a8772e..df677a3a13 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6328,8 +6328,12 @@ call_func( } - /* execute the function if no errors detected and executing */ - if (evaluate && error == ERROR_NONE) { + // Execute the function if executing and no errors were detected. + if (!evaluate) { + // Not evaluating, which means the return value is unknown. This + // matters for giving error messages. + rettv->v_type = VAR_UNKNOWN; + } else if (error == ERROR_NONE) { char_u *rfname = fname; /* Ignore "g:" before a function name. */ |