patch 9.0.1426: indent wrong after "export namespace" in C++
Problem: Indent wrong after "export namespace" in C++.
Solution: Skip over "inline" and "export" in any order. (Virginia Senioria,
closes #12134, closes #12133)
diff --git a/src/cindent.c b/src/cindent.c
index e8e255f..176bc05 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -769,7 +769,9 @@
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])))