]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.278
- updated to 7.2.330
[packages/vim.git] / 7.2.278
CommitLineData
c936e692
AG
1To: vim-dev@vim.org
2Subject: Patch 7.2.278
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.278
11Problem: Using magic number in the folding code.
12Solution: Use the defined MAX_LEVEL.
13Files: src/fold.c
14
15
16*** ../vim-7.2.277/src/fold.c 2009-11-03 14:46:35.000000000 +0100
17--- src/fold.c 2009-11-03 12:36:37.000000000 +0100
18***************
19*** 1932,1938 ****
20 #ifdef FEAT_EVAL
21 if (*wp->w_p_fdt != NUL)
22 {
23! char_u dashes[51];
24 win_T *save_curwin;
25 int level;
26 char_u *p;
27--- 1932,1938 ----
28 #ifdef FEAT_EVAL
29 if (*wp->w_p_fdt != NUL)
30 {
31! char_u dashes[MAX_LEVEL + 2];
32 win_T *save_curwin;
33 int level;
34 char_u *p;
35***************
36*** 1944,1951 ****
37 /* Set "v:folddashes" to a string of "level" dashes. */
38 /* Set "v:foldlevel" to "level". */
39 level = foldinfo->fi_level;
40! if (level > 50)
41! level = 50;
42 vim_memset(dashes, '-', (size_t)level);
43 dashes[level] = NUL;
44 set_vim_var_string(VV_FOLDDASHES, dashes, -1);
45--- 1944,1951 ----
46 /* Set "v:folddashes" to a string of "level" dashes. */
47 /* Set "v:foldlevel" to "level". */
48 level = foldinfo->fi_level;
49! if (level > (int)sizeof(dashes) - 1)
50! level = (int)sizeof(dashes) - 1;
51 vim_memset(dashes, '-', (size_t)level);
52 dashes[level] = NUL;
53 set_vim_var_string(VV_FOLDDASHES, dashes, -1);
54*** ../vim-7.2.277/src/version.c 2009-11-03 16:22:59.000000000 +0100
55--- src/version.c 2009-11-03 16:29:08.000000000 +0100
56***************
57*** 678,679 ****
58--- 678,681 ----
59 { /* Add new patch number below this line */
60+ /**/
61+ 278,
62 /**/
63
64--
65BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
66ARTHUR: What do you mean? An African or European swallow?
67BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
68 BRIDGEKEEPER is cast into the gorge.
69 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
70
71 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
72/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
73\\\ download, build and distribute -- http://www.A-A-P.org ///
74 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.036595 seconds and 4 git commands to generate.