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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user