1
0
forked from aniani/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 #11653)
This commit is contained in:
Bram Moolenaar
2022-12-02 15:58:38 +00:00
parent 9c8d12c811
commit c96b7f5d2a
9 changed files with 70 additions and 33 deletions

View File

@@ -6387,5 +6387,17 @@ func Test_info_line_with_space()
call setqflist([], '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