mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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)
This commit is contained in:
parent
08499f5a4d
commit
39803d82db
@ -1853,6 +1853,7 @@ curbuf_reusable(void)
|
|||||||
&& curbuf->b_ffname == NULL
|
&& curbuf->b_ffname == NULL
|
||||||
&& curbuf->b_nwindows <= 1
|
&& curbuf->b_nwindows <= 1
|
||||||
&& (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY())
|
&& (curbuf->b_ml.ml_mfp == NULL || BUFEMPTY())
|
||||||
|
&& !bt_quickfix(curbuf)
|
||||||
&& !curbufIsChanged());
|
&& !curbufIsChanged());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4012,3 +4012,17 @@ func Test_winonly_autocmd()
|
|||||||
new | only
|
new | only
|
||||||
call delete('Xtest1')
|
call delete('Xtest1')
|
||||||
endfunc
|
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
|
||||||
|
@ -771,6 +771,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1134,
|
||||||
/**/
|
/**/
|
||||||
1133,
|
1133,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user