| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.912 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.912 |
| Problem: Wrong indenting for C++ constructor. |
| Solution: Recognize ::. (Anhong) |
| Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok |
| |
| |
| |
| |
| |
| *** 6250,6255 **** |
| --- 6250,6268 ---- |
| { |
| if (cin_iscomment(s)) /* ignore comments */ |
| s = cin_skipcomment(s); |
| + else if (*s == ':') |
| + { |
| + if (*(s + 1) == ':') |
| + s += 2; |
| + else |
| + /* To avoid a mistake in the following situation: |
| + * A::A(int a, int b) |
| + * : a(0) // <--not a function decl |
| + * , b(0) |
| + * {... |
| + */ |
| + return FALSE; |
| + } |
| else |
| ++s; |
| } |
| |
| |
| |
| *** 663,668 **** |
| --- 663,675 ---- |
| { |
| } |
| |
| + A::A(int a, int b) |
| + : aa(a), |
| + bb(b), |
| + cc(c) |
| + { |
| + } |
| + |
| class CAbc : |
| public BaseClass1, |
| protected BaseClass2 |
| |
| |
| |
| *** 651,656 **** |
| --- 651,663 ---- |
| { |
| } |
| |
| + A::A(int a, int b) |
| + : aa(a), |
| + bb(b), |
| + cc(c) |
| + { |
| + } |
| + |
| class CAbc : |
| public BaseClass1, |
| protected BaseClass2 |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 912, |
| /**/ |
| |
| -- |
| From "know your smileys": |
| +<(:-) The Pope |
| |
| /// 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 /// |