diff src/testdir/test_quickfix.vim @ 15965:f376cd250b07 v8.1.0988

patch 8.1.0988: deleting location list buffer breaks location list window commit https://github.com/vim/vim/commit/d82a81cad93708a6c180e59119db4818cc38c1a9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 2 07:57:18 2019 +0100 patch 8.1.0988: deleting location list buffer breaks location list window Problem: Deleting a location list buffer breaks location list window functionality. Solution: (Yegappan Lakshmanan, closes #4056)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Mar 2019 08:00:06 +0100
parents 77e97f159554
children 096b8ccd855e
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -3933,6 +3933,16 @@ func Xqfbuf_test(cchar)
     call assert_match(qfbnum . '  h-  "\[Location List]"', execute('ls'))
     call assert_true(bufloaded(qfbnum))
 
+    " After deleting a location list buffer using ":bdelete", opening the
+    " location list window should mark the buffer as a location list buffer.
+    exe "bdelete " . qfbnum
+    lopen
+    call assert_equal("quickfix", &buftype)
+    call assert_equal(1, getwininfo(win_getid(winnr()))[0].loclist)
+    call assert_equal(wid, getloclist(0, {'filewinid' : 0}).filewinid)
+    call assert_false(&swapfile)
+    lclose
+
     " When the location list is cleared for the window, the buffer should be
     " removed
     call setloclist(0, [], 'f')