From 00246d7be550cf990dac7e49903519f5dd68e89c Mon Sep 17 00:00:00 2001 From: kevinhwang91 Date: Tue, 4 May 2021 13:55:38 +0800 Subject: vim-patch:8.2.0933: 'quickfixtextfunc' does not get window ID of location list Problem: 'quickfixtextfunc' does not get window ID of location list. Solution: Add "winid" to the dict argument. (Yegappan Lakshmanan, closes vim/vim#6222) https://github.com/vim/vim/commit/7ba5a7eff335dcce25afaa154f32eeadb6014b61 --- src/nvim/testdir/test_quickfix.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 3ba4e9caab..ed83a96906 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -4812,7 +4812,7 @@ func Tqfexpr(info) let qfl = getqflist({'id' : a:info.id, 'idx' : a:info.idx, \ 'items' : 1}).items else - let qfl = getloclist(0, {'id' : a:info.id, 'idx' : a:info.idx, + let qfl = getloclist(a:info.winid, {'id' : a:info.id, 'idx' : a:info.idx, \ 'items' : 1}).items endif @@ -4853,7 +4853,7 @@ func Xtest_qftextfunc(cchar) let qfl = getqflist({'id' : a:info.id, 'idx' : a:info.idx, \ 'items' : 1}).items else - let qfl = getloclist(0, {'id' : a:info.id, 'idx' : a:info.idx, + let qfl = getloclist(a:info.winid, {'id' : a:info.id, 'idx' : a:info.idx, \ 'items' : 1}).items endif if empty(qfl) @@ -4868,6 +4868,11 @@ func Xtest_qftextfunc(cchar) call assert_equal('Line 10, Col 2', getline(1)) call assert_equal('Line 20, Col 4', getline(2)) Xclose + " Add entries to the list when the quickfix buffer is hidden + Xaddexpr ['F1:30:6:red'] + Xwindow + call assert_equal('Line 30, Col 6', getline(3)) + Xclose call g:Xsetlist([], 'r', {'quickfixtextfunc' : ''}) set quickfixtextfunc& delfunc PerQfText -- cgit