summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.398
blob: 8d4b21381b0d82ef7a0e8643fe7d82fbf99b68f3 (plain) (blame)
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
To: vim_dev@googlegroups.com
Subject: Patch 7.3.398
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.398
Problem:    When creating more than 10 location lists and adding items one by
	    one a previous location may be used. (Audrius Kažukauskas)
Solution:   Clear the location list completely when adding the tenth one.
Files:	    src/quickfix.c


*** ../vim-7.3.397/src/quickfix.c	2012-01-10 16:28:41.000000000 +0100
--- src/quickfix.c	2012-01-10 16:58:52.000000000 +0100
***************
*** 899,906 ****
      }
      else
  	qi->qf_curlist = qi->qf_listcount++;
!     qi->qf_lists[qi->qf_curlist].qf_index = 0;
!     qi->qf_lists[qi->qf_curlist].qf_count = 0;
      if (qf_title != NULL)
      {
  	char_u *p = alloc((int)STRLEN(qf_title) + 2);
--- 899,905 ----
      }
      else
  	qi->qf_curlist = qi->qf_listcount++;
!     vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
      if (qf_title != NULL)
      {
  	char_u *p = alloc((int)STRLEN(qf_title) + 2);
***************
*** 909,916 ****
  	if (p != NULL)
  	    sprintf((char *)p, ":%s", (char *)qf_title);
      }
-     else
- 	qi->qf_lists[qi->qf_curlist].qf_title = NULL;
  }
  
  /*
--- 908,913 ----
*** ../vim-7.3.397/src/version.c	2012-01-10 16:28:41.000000000 +0100
--- src/version.c	2012-01-10 17:13:09.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     398,
  /**/

-- 
Why don't cannibals eat clowns?
Because they taste funny.

 /// 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    ///