diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 03:44:37 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 04:05:18 +0800 |
commit | afb3ff52ecafe2d5bd1239869124794bb2ac68b9 (patch) | |
tree | 6be3628f7d152c1f703f59fa1050039c90244707 /src/nvim/testdir | |
parent | 1e6d5fdf3f15142dafef6c5bd32ebacf383460f1 (diff) | |
download | rneovim-afb3ff52ecafe2d5bd1239869124794bb2ac68b9.tar.gz rneovim-afb3ff52ecafe2d5bd1239869124794bb2ac68b9.tar.bz2 rneovim-afb3ff52ecafe2d5bd1239869124794bb2ac68b9.zip |
vim-patch:9.0.0990: callback name argument is changed by setqflist()
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 vim/vim#11653)
https://github.com/vim/vim/commit/c96b7f5d2af241c5eb1589e9da3dc09e45355e65
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index a6c0b2491a..7b94c4027c 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -6180,5 +6180,17 @@ func Test_loclist_replace_autocmd() call setloclist(0, [], 'f') endfunc +func s:QfTf(_) +endfunc + +func Test_setqflist_cb_arg() + " This was changing the callback name in the dictionary. + let d = #{quickfixtextfunc: 's:QfTf'} + call setqflist([], 'a', d) + call assert_equal('s:QfTf', d.quickfixtextfunc) + + call setqflist([], 'f') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |