diff src/testdir/test_quickfix.vim @ 27601:cb46dd386990 v8.2.4327

patch 8.2.4327: may end up with no current buffer Commit: https://github.com/vim/vim/commit/e3537aec2f8d6470010547af28dcbd83d41461b8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 8 15:05:20 2022 +0000 patch 8.2.4327: may end up with no current buffer Problem: May end up with no current buffer. Solution: When deleting the current buffer to not pick a quickfix buffer as the new current buffer.
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Feb 2022 16:15:03 +0100
parents b8a5de86e9d1
children bf540a32439a
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -5851,5 +5851,30 @@ func Test_lopen_bwipe()
   delfunc R
 endfunc
 
+" Another sequence of commands that caused all buffers to be wiped out
+func Test_lopen_bwipe_all()
+  let lines =<< trim END
+    func R()
+      silent! tab lopen
+      e foo
+      silent! lfile
+    endfunc
+    cal R()
+    exe "norm \<C-W>\<C-V>0"
+    cal R()
+    bwipe
+
+    call writefile(['done'], 'Xresult')
+    qall!
+  END
+  call writefile(lines, 'Xscript')
+  if RunVim([], [], '-u NONE -n -X -Z -e -m -s -S Xscript')
+    call assert_equal(['done'], readfile('Xresult'))
+  endif
+
+  call delete('Xscript')
+  call delete('Xresult')
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab