]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.378
- new
[packages/vim.git] / 7.2.378
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.378
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.378
11 Problem:    C function declaration indented too much. (Rui)
12 Solution:   Don't see a line containing { or } as a type. (Matt Wozniski)
13 Files:      src/misc1.c
14
15
16 *** ../vim-7.2.377/src/misc1.c  2010-01-06 17:46:03.000000000 +0100
17 --- src/misc1.c 2010-02-26 22:36:50.000000000 +0100
18 ***************
19 *** 7727,7737 ****
20         /*
21          * If the NEXT line is a function declaration, the current
22          * line needs to be indented as a function type spec.
23 !        * Don't do this if the current line looks like a comment
24 !        * or if the current line is terminated, ie. ends in ';'.
25          */
26         else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
27                 && !cin_nocode(theline)
28                 && !cin_ends_in(theline, (char_u *)":", NULL)
29                 && !cin_ends_in(theline, (char_u *)",", NULL)
30                 && cin_isfuncdecl(NULL, cur_curpos.lnum + 1)
31 --- 7727,7740 ----
32         /*
33          * If the NEXT line is a function declaration, the current
34          * line needs to be indented as a function type spec.
35 !        * Don't do this if the current line looks like a comment or if the
36 !        * current line is terminated, ie. ends in ';', or if the current line
37 !        * contains { or }: "void f() {\n if (1)"
38          */
39         else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
40                 && !cin_nocode(theline)
41 +               && vim_strchr(theline, '{') == NULL
42 +               && vim_strchr(theline, '}') == NULL
43                 && !cin_ends_in(theline, (char_u *)":", NULL)
44                 && !cin_ends_in(theline, (char_u *)",", NULL)
45                 && cin_isfuncdecl(NULL, cur_curpos.lnum + 1)
46 *** ../vim-7.2.377/src/version.c        2010-02-26 22:05:17.000000000 +0100
47 --- src/version.c       2010-03-02 12:30:30.000000000 +0100
48 ***************
49 *** 683,684 ****
50 --- 683,686 ----
51   {   /* Add new patch number below this line */
52 + /**/
53 +     378,
54   /**/
55
56 -- 
57    An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
58    shoulders) walks out from the dark trees.  He is extremely fierce and
59    gruesome countenance.  He walks towards KING ARTHUR and PATSY, who are
60    wazzing like mad.  (Salopian slang, meaning very scared.  almost to the
61    point of wetting oneself, e.g. before an important football match or
62    prior to a postering.  Salopian slang meaning a beating by the school
63    praeposters.  Sorry about the Salopian slant to this stage direction - Ed.)
64                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
65
66  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
67 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
68 \\\        download, build and distribute -- http://www.A-A-P.org        ///
69  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.034614 seconds and 3 git commands to generate.