To: vim_dev@googlegroups.com Subject: Patch 8.1.1134 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1134 Problem: Buffer for quickfix window is reused for another file. Solution: Don't reuse the quickfx buffer. (Yegappan Lakshmanan) Files: src/buffer.c, src/testdir/test_quickfix.vim *** ../vim-8.1.1133/src/buffer.c 2019-04-04 18:15:05.770857065 +0200 --- src/buffer.c 2019-04-07 12:01:05.692262700 +0200 *************** *** 1853,1858 **** --- 1853,1859 ---- && curbuf->b_ffname == NULL && curbuf->b_nwindows <= 1 && (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY()) + && !bt_quickfix(curbuf) && !curbufIsChanged()); } *** ../vim-8.1.1133/src/testdir/test_quickfix.vim 2019-04-04 14:04:06.994917179 +0200 --- src/testdir/test_quickfix.vim 2019-04-07 12:03:22.011530000 +0200 *************** *** 4012,4014 **** --- 4012,4028 ---- new | only call delete('Xtest1') endfunc + + " Test to make sure that an empty quickfix buffer is not reused for loading + " a normal buffer. + func Test_empty_qfbuf() + enew | only + call writefile(["Test"], 'Xfile1') + call setqflist([], 'f') + copen | only + let qfbuf = bufnr('') + edit Xfile1 + call assert_notequal(qfbuf, bufnr('')) + enew + call delete('Xfile1') + endfunc *** ../vim-8.1.1133/src/version.c 2019-04-07 11:56:14.913845511 +0200 --- src/version.c 2019-04-07 12:02:26.731826564 +0200 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1134, /**/ -- hundred-and-one symptoms of being an internet addict: 221. Your wife melts your keyboard in the oven. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///