Mercurial > vim
comparison src/cindent.c @ 32190:73489b6c4a02 v9.0.1426
patch 9.0.1426: indent wrong after "export namespace" in C++
Commit: https://github.com/vim/vim/commit/99e4ab2a1e577ddb29030c09c308b67e16fd51c4
Author: Virginia Senioria <91khr@users.noreply.github.com>
Date: Fri Mar 24 19:25:06 2023 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 24 Mar 2023 20:30:04 +0100 |
parents | 50555279168b |
children | 2ed95122d59c |
comparison
equal
deleted
inserted
replaced
32189:1a46b76ea2cb | 32190:73489b6c4a02 |
---|---|
767 int has_name = FALSE; | 767 int has_name = FALSE; |
768 int has_name_start = FALSE; | 768 int has_name_start = FALSE; |
769 | 769 |
770 s = cin_skipcomment(s); | 770 s = cin_skipcomment(s); |
771 | 771 |
772 if (STRNCMP(s, "inline", 6) == 0 && (s[6] == NUL || !vim_iswordc(s[6]))) | 772 // skip over "inline" and "export" in any order |
773 while ((STRNCMP(s, "inline", 6) == 0 || STRNCMP(s, "export", 6) == 0) | |
774 && (s[6] == NUL || !vim_iswordc(s[6]))) | |
773 s = cin_skipcomment(skipwhite(s + 6)); | 775 s = cin_skipcomment(skipwhite(s + 6)); |
774 | 776 |
775 if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) | 777 if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) |
776 { | 778 { |
777 p = cin_skipcomment(skipwhite(s + 9)); | 779 p = cin_skipcomment(skipwhite(s + 9)); |