4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: C function declaration indented too much. (Rui)
12 Solution: Don't see a line containing { or } as a type. (Matt Wozniski)
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
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 ';'.
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)
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)"
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
51 { /* Add new patch number below this line */
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
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 ///