To: vim_dev@googlegroups.com Subject: Patch 7.3.379 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.379 Problem: C-indenting wrong for static enum. Solution: Skip over "static". (Lech Lorens) Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok *** ../vim-7.3.378/src/misc1.c 2011-11-30 17:20:18.000000000 +0100 --- src/misc1.c 2011-12-14 19:37:48.000000000 +0100 *************** *** 5138,5143 **** --- 5138,5146 ---- if (STRNCMP(s, "typedef", 7) == 0 && !vim_isIDc(s[7])) s = cin_skipcomment(s + 7); + if (STRNCMP(s, "static", 6) == 0 && !vim_isIDc(s[6])) + s = cin_skipcomment(s + 6); + if (STRNCMP(s, "enum", 4) == 0 && !vim_isIDc(s[4])) return TRUE; *** ../vim-7.3.378/src/testdir/test3.in 2011-11-30 17:20:18.000000000 +0100 --- src/testdir/test3.in 2011-12-14 20:03:11.000000000 +0100 *************** *** 299,316 **** enum soppie { ! yes = 0, ! no, ! maybe }; typedef enum soppie { ! yes = 0, ! no, ! maybe }; { int a, b; --- 299,323 ---- enum soppie { ! yes = 0, ! no, ! maybe }; typedef enum soppie { ! yes = 0, ! no, ! maybe }; + static enum + { + yes = 0, + no, + maybe + } soppie; + { int a, b; *** ../vim-7.3.378/src/testdir/test3.ok 2011-11-30 17:20:18.000000000 +0100 --- src/testdir/test3.ok 2011-12-14 19:37:48.000000000 +0100 *************** *** 299,304 **** --- 299,311 ---- maybe }; + static enum + { + yes = 0, + no, + maybe + } soppie; + { int a, b; *** ../vim-7.3.378/src/version.c 2011-12-14 19:22:29.000000000 +0100 --- src/version.c 2011-12-14 20:02:19.000000000 +0100 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 379, /**/ -- You cannot propel yourself forward by patting yourself on the back. /// 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 ///