0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

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)
This commit is contained in:
Virginia Senioria
2023-03-24 19:25:06 +00:00
committed by Bram Moolenaar
parent 3ea62381c5
commit 99e4ab2a1e
3 changed files with 29 additions and 1 deletions

View File

@@ -769,7 +769,9 @@ cin_is_cpp_namespace(char_u *s)
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])))