From 227f63a622b5cf0dbdd3c9c5b57f7028bc2c0c46 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mar 02 2010 15:12:07 +0000 Subject: - patchlevel 378 --- diff --git a/7.2.378 b/7.2.378 new file mode 100644 index 0000000..de2251f --- /dev/null +++ b/7.2.378 @@ -0,0 +1,69 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.378 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.378 +Problem: C function declaration indented too much. (Rui) +Solution: Don't see a line containing { or } as a type. (Matt Wozniski) +Files: src/misc1.c + + +*** ../vim-7.2.377/src/misc1.c 2010-01-06 17:46:03.000000000 +0100 +--- src/misc1.c 2010-02-26 22:36:50.000000000 +0100 +*************** +*** 7727,7737 **** + /* + * If the NEXT line is a function declaration, the current + * line needs to be indented as a function type spec. +! * Don't do this if the current line looks like a comment +! * or if the current line is terminated, ie. ends in ';'. + */ + else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count + && !cin_nocode(theline) + && !cin_ends_in(theline, (char_u *)":", NULL) + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1) +--- 7727,7740 ---- + /* + * If the NEXT line is a function declaration, the current + * line needs to be indented as a function type spec. +! * Don't do this if the current line looks like a comment or if the +! * current line is terminated, ie. ends in ';', or if the current line +! * contains { or }: "void f() {\n if (1)" + */ + else if (cur_curpos.lnum < curbuf->b_ml.ml_line_count + && !cin_nocode(theline) ++ && vim_strchr(theline, '{') == NULL ++ && vim_strchr(theline, '}') == NULL + && !cin_ends_in(theline, (char_u *)":", NULL) + && !cin_ends_in(theline, (char_u *)",", NULL) + && cin_isfuncdecl(NULL, cur_curpos.lnum + 1) +*** ../vim-7.2.377/src/version.c 2010-02-26 22:05:17.000000000 +0100 +--- src/version.c 2010-03-02 12:30:30.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 378, + /**/ + +-- + An extraordinary TALL KNIGHT in all black (possibly John with Mike on his + shoulders) walks out from the dark trees. He is extremely fierce and + gruesome countenance. He walks towards KING ARTHUR and PATSY, who are + wazzing like mad. (Salopian slang, meaning very scared. almost to the + point of wetting oneself, e.g. before an important football match or + prior to a postering. Salopian slang meaning a beating by the school + praeposters. Sorry about the Salopian slant to this stage direction - Ed.) + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///