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 #6222)
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 96729a4..7587d97 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -4822,7 +4822,7 @@
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
@@ -4863,7 +4863,7 @@
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)
@@ -4878,6 +4878,11 @@
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