comparison src/testdir/test_quickfix.vim @ 31313:b6bef244837e v9.0.0990

patch 9.0.0990: callback name argument is changed by setqflist() Commit: https://github.com/vim/vim/commit/c96b7f5d2af241c5eb1589e9da3dc09e45355e65 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 2 15:58:38 2022 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Dec 2022 17:00:04 +0100
parents a7dba627a21b
children 552ca9b4218d
comparison
equal deleted inserted replaced
31312:9b63b0076e6e 31313:b6bef244837e
6385 \ ' 2: 20 | Afunc():', ' 3: ', ' 4: | ^'], l) 6385 \ ' 2: 20 | Afunc():', ' 3: ', ' 4: | ^'], l)
6386 6386
6387 call setqflist([], 'f') 6387 call setqflist([], 'f')
6388 endfunc 6388 endfunc
6389 6389
6390 func s:QfTf(_)
6391 endfunc
6392
6393 func Test_setqflist_cb_arg()
6394 " This was changing the callback name in the dictionary.
6395 let d = #{quickfixtextfunc: 's:QfTf'}
6396 call setqflist([], 'a', d)
6397 call assert_equal('s:QfTf', d.quickfixtextfunc)
6398
6399 call setqflist([], 'f')
6400 endfunc
6401
6390 6402
6391 " vim: shiftwidth=2 sts=2 expandtab 6403 " vim: shiftwidth=2 sts=2 expandtab