forked from aniani/vim
patch 9.1.0731: inconsistent case sensitive extension matching
Problem: inconsistent case sensitive extension matching
Solution: unify case sensitive extension matching (Evgeni Chasnovski).
There are different approaches of how extensions are matched with
respect to case sensitivity. In particular, '\c' flag is used in pattern
whereas in most places case sensitive matching is guarded behind
`has("fname_case")` condition.
Replace all instances of '\c' with an explicit case sensitive pattern
variants guarded by `has("fname_case")`. Strictly speaking, this is a
breaking change because only two (most common and prevailingly tested)
variants are now matched: upper first letter and upper all letters.
closes: #15672
Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
4d427d4cab
commit
59b089c9df
@@ -1155,15 +1155,14 @@ func Test_cfg_file()
|
||||
unlet g:filetype_cfg
|
||||
|
||||
" RAPID cfg
|
||||
let ext = 'cfg'
|
||||
for i in ['EIO', 'MMC', 'MOC', 'PROC', 'SIO', 'SYS']
|
||||
call writefile([i .. ':CFG'], 'cfgfile.' .. ext)
|
||||
execute "split cfgfile." .. ext
|
||||
call assert_equal('rapid', &filetype)
|
||||
bwipe!
|
||||
call delete('cfgfile.' .. ext)
|
||||
" check different case of file extension
|
||||
let ext = substitute(ext, '\(\l\)', '\u\1', '')
|
||||
for ext in ['cfg', 'Cfg', 'CFG']
|
||||
call writefile([i .. ':CFG'], 'cfgfile.' .. ext)
|
||||
execute "split cfgfile." .. ext
|
||||
call assert_equal('rapid', &filetype)
|
||||
bwipe!
|
||||
call delete('cfgfile.' .. ext)
|
||||
endfor
|
||||
endfor
|
||||
|
||||
" clean up
|
||||
|
||||
@@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
731,
|
||||
/**/
|
||||
730,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user