runtime(filetype): ft detection maybe wrong if 'fic' set for *.[CH]

Commit: 
https://github.com/vim/vim/commit/fa920da283f6651083b40d0aa28a9eacd5116593
Author: shane.xb.qian <[email protected]>
Date:   Mon Dec 11 17:33:03 2023 +0100

    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index e7343bd6f..4043eb428 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -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 <[email protected]>
 
 " 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)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rCjOz-00EWsz-3g%40256bit.org.

Raspunde prin e-mail lui