Mercurial > vim
diff src/testdir/test_quickfix.vim @ 16259:1f18984498e1 v8.1.1134
patch 8.1.1134: buffer for quickfix window is reused for another file
commit https://github.com/vim/vim/commit/39803d82dbb215d2eea9fcd6cf2961b71515a438
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 7 12:04:51 2019 +0200
patch 8.1.1134: buffer for quickfix window is reused for another file
Problem: Buffer for quickfix window is reused for another file.
Solution: Don't reuse the quickfx buffer. (Yegappan Lakshmanan)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Apr 2019 12:15:04 +0200 |
parents | 4202f556aefe |
children | 393dd420a753 |
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -4012,3 +4012,17 @@ func Test_winonly_autocmd() 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