Problem: Indent wrong after "export namespace" in C++.
Solution: Skip over "inline" and "export" in any order. (Virginia Senioria,
closes #12134, closes #12133)
s = cin_skipcomment(s);
- if (STRNCMP(s, "inline", 6) == 0 && (s[6] == NUL || !vim_iswordc(s[6])))
+ // skip over "inline" and "export" in any order
+ while ((STRNCMP(s, "inline", 6) == 0 || STRNCMP(s, "export", 6) == 0)
+ && (s[6] == NUL || !vim_iswordc(s[6])))
s = cin_skipcomment(skipwhite(s + 6));
if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9])))
inline/* test */namespace {
111111111111111111;
}
+ export namespace {
+ 111111111111111111;
+ }
+ export inline namespace {
+ 111111111111111111;
+ }
+ export/* test */inline namespace {
+ 111111111111111111;
+ }
+ inline export namespace {
+ 111111111111111111;
+ }
/* invalid namespaces use block indent */
namespace test test2 {
inline/* test */namespace {
111111111111111111;
}
+ export namespace {
+ 111111111111111111;
+ }
+ export inline namespace {
+ 111111111111111111;
+ }
+ export/* test */inline namespace {
+ 111111111111111111;
+ }
+ inline export namespace {
+ 111111111111111111;
+ }
/* invalid namespaces use block indent */
namespace test test2 {
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1426,
/**/
1425,
/**/