Skip to content

Commit

Permalink
runtime(filetype): ft detection maybe wrong if 'fic' set for *.[CH]
Browse files Browse the repository at this point in the history
So only set the filetype to cpp for *.C and *.H files, if
'fileignorecase' option is not set.

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
Shane-XB-Qian authored and chrisbra committed Dec 11, 2023
1 parent 1ec115c commit fa920da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Last Change: 2023 Dec 06
" Former Maintainer: Bram Moolenaar <Bram@vim.org>

" Listen very carefully, I will say this only once
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fa920da

Please sign in to comment.