diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-12-22 20:55:30 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-22 20:55:30 +0000 |
commit | f2f0bddf303e37d4d532ca22e2d53179c20b1d19 (patch) | |
tree | 628c3660c385a270fa06d7129e504e8155426b03 /src/cindent.c | |
parent | b4168fd917e869912e0649fe13c10e5e6a595199 (diff) |
patch 8.2.3876: 'cindent' does not recognize inline namespacev8.2.3876
Problem: 'cindent' does not recognize inline namespace.
Solution: Skip over "inline" to find "namespace". (closes #9383)
Diffstat (limited to 'src/cindent.c')
-rw-r--r-- | src/cindent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cindent.c b/src/cindent.c index 4fa165e699..42b46e4016 100644 --- a/src/cindent.c +++ b/src/cindent.c @@ -755,6 +755,10 @@ cin_is_cpp_namespace(char_u *s) int has_name_start = FALSE; s = cin_skipcomment(s); + + if (STRNCMP(s, "inline", 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]))) { p = cin_skipcomment(skipwhite(s + 9)); |