Mercurial > vim
changeset 2807:11e62fb6f815 v7.3.179
updated for version 7.3.179
Problem: C-indent doesn't handle colon in string correctly.
Solution: Skip the string. (Lech Lorens)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 10 May 2011 11:56:30 +0200 |
parents | 27b142f1f434 |
children | e03eca3edf65 |
files | src/misc1.c src/testdir/test3.in src/testdir/test3.ok src/version.c |
diffstat | 4 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -5801,7 +5801,9 @@ cin_is_cpp_baseclass(col) continue; } - if (s[0] == ':') + if (s[0] == '"') + s = skip_string(s) + 1; + else if (s[0] == ':') { if (s[1] == ':') {
--- a/src/testdir/test3.in +++ b/src/testdir/test3.in @@ -1360,6 +1360,19 @@ void func(void) } STARTTEST +:set cino& +2kdd=][ +ENDTEST + +void func(void) +{ + cout << "a" + << "b" + << ") :" + << "c"; +} + +STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out ENDTEST