summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1134
blob: 94d17c27641230da8690acc9ab75882b830afe86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1134
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
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    ///