1
0
forked from aniani/vim

patch 8.2.3876: 'cindent' does not recognize inline namespace

Problem:    'cindent' does not recognize inline namespace.
Solution:   Skip over "inline" to find "namespace". (closes #9383)
This commit is contained in:
zeertzjq
2021-12-22 20:55:30 +00:00
committed by Bram Moolenaar
parent b4168fd917
commit f2f0bddf30
3 changed files with 54 additions and 0 deletions

View File

@@ -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));