diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-19 12:47:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 12:47:44 +0800 |
commit | 92e51d7e4b79913434c7b74a275babcf65098b97 (patch) | |
tree | 8f0139c336ea595a413205b96c6bbf9b57bbef36 /src/nvim/eval/userfunc.c | |
parent | f2b30b4d62b97da6ae1b4dd7c4e5730fc5bc95f7 (diff) | |
download | rneovim-92e51d7e4b79913434c7b74a275babcf65098b97.tar.gz rneovim-92e51d7e4b79913434c7b74a275babcf65098b97.tar.bz2 rneovim-92e51d7e4b79913434c7b74a275babcf65098b97.zip |
vim-patch:8.2.5167: get(Fn, 'name') on funcref returns special byte code (#21112)
Problem: get(Fn, 'name') on funcref returns special byte code.
Solution: Use the printable name.
https://github.com/vim/vim/commit/1ae8c262df7083dfb4b41485508951c50eccc84c
Cherry-pick printable_func_name() from patch 8.2.0149.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 893a4c77eb..ae867cb716 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -1652,6 +1652,11 @@ theend: return ret; } +char_u *printable_func_name(ufunc_T *fp) +{ + return fp->uf_name_exp != NULL ? fp->uf_name_exp : fp->uf_name; +} + /// List the head of the function: "name(arg1, arg2)". /// /// @param[in] fp Function pointer. |