From: shane.xb.qian Date: Mon, 11 Dec 2023 16:33:03 +0000 (+0100) Subject: runtime(filetype): ft detection maybe wrong if 'fic' set for *.[CH] X-Git-Tag: v9.0.2156~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa920da283f6651083b40d0aa28a9eacd5116593;p=thirdparty%2Fvim.git runtime(filetype): ft detection maybe wrong if 'fic' set for *.[CH] So only set the filetype to cpp for *.C and *.H files, if 'fileignorecase' option is not set. Signed-off-by: shane.xb.qian Signed-off-by: Christian Brabandt --- diff --git a/runtime/filetype.vim b/runtime/filetype.vim index e7343bd6ff..4043eb428e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Last Change: 2023 Dec 06 " Former Maintainer: Bram Moolenaar " Listen very carefully, I will say this only once @@ -348,7 +348,7 @@ au BufNewFile,BufRead *.cypher setf cypher " C++ au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp if has("fname_case") - au BufNewFile,BufRead *.C,*.H setf cpp + au BufNewFile,BufRead *.C,*.H if !&fileignorecase | setf cpp | endif endif " C++ 20 modules (clang)