forked from aniani/vim
patch 8.2.3762: if quickfix buffer is wiped out getqflist() still returns it
Problem: If the quickfix buffer is wiped out getqflist() still returns its
number.
Solution: Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
closes #9306)
This commit is contained in:
committed by
Bram Moolenaar
parent
a48d4e44a2
commit
56150da687
@@ -4626,6 +4626,13 @@ func Xqfbuf_test(cchar)
|
||||
call assert_equal(qfbnum, bufnr(''))
|
||||
Xclose
|
||||
|
||||
" When quickfix buffer is wiped out, getqflist() should return 0
|
||||
%bw!
|
||||
Xexpr ""
|
||||
Xopen
|
||||
bw!
|
||||
call assert_equal(0, g:Xgetlist({'qfbufnr': 0}).qfbufnr)
|
||||
|
||||
if a:cchar == 'l'
|
||||
%bwipe
|
||||
" For a location list, when both the file window and the location list
|
||||
|
||||
Reference in New Issue
Block a user