aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorVVKot <volodymyr.kot.ua@gmail.com>2021-12-19 11:06:16 +0000
committerzeertzjq <zeertzjq@outlook.com>2022-03-13 13:17:28 +0800
commitff48e61ec9ce0fed62b31609c2a83caaa862ccba (patch)
tree8a3581dede8900e36a009bc086a503fb1e87fbe8 /src/nvim/testdir
parentc5e47e44aa139fa4f9e2f31fe591ddd6b5ca4909 (diff)
downloadrneovim-ff48e61ec9ce0fed62b31609c2a83caaa862ccba.tar.gz
rneovim-ff48e61ec9ce0fed62b31609c2a83caaa862ccba.tar.bz2
rneovim-ff48e61ec9ce0fed62b31609c2a83caaa862ccba.zip
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 vim/vim#9306) https://github.com/vim/vim/commit/56150da6879a96db1c84c7ec4ceedeb84969f606
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 48bafc4b7e..14d13049d9 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -4483,6 +4483,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