diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-12-02 15:58:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-12-02 15:58:38 +0000 |
commit | c96b7f5d2af241c5eb1589e9da3dc09e45355e65 (patch) | |
tree | ef26f1475c713f971de88df0f7eec925c5822aca /src/option.c | |
parent | 9c8d12c8115640927823919001a03c79d4118063 (diff) |
patch 9.0.0990: callback name argument is changed by setqflist()v9.0.0990
Problem: Callback name argument is changed by setqflist().
Solution: Use the expanded function name for the callback, do not store it
in the argument. (closes #11653)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index 816837d0af..07a9e52f3a 100644 --- a/src/option.c +++ b/src/option.c @@ -7370,6 +7370,8 @@ option_set_callback_func(char_u *optval UNUSED, callback_T *optcb UNUSED) free_callback(optcb); set_callback(optcb, &cb); + if (cb.cb_free_name) + vim_free(cb.cb_name); free_tv(tv); // when using Vim9 style "import.funcname" it needs to be expanded to |