mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
vim-patch:9.0.0073: too many files recognized as bsdl (#19504)
Problem: Too many files recognized as bsdl.
Solution: Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij,
closes vim/vim#10783)
1b67f07f76
This commit is contained in:
parent
1a4753f25a
commit
2a9c9371bc
@ -260,7 +260,7 @@ au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/
|
|||||||
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||||
|
|
||||||
" BSDL
|
" BSDL
|
||||||
au BufNewFile,BufRead *bsd,*.bsdl setf bsdl
|
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
|
||||||
|
|
||||||
" Bazel (http://bazel.io)
|
" Bazel (http://bazel.io)
|
||||||
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
|
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
|
||||||
|
@ -176,6 +176,7 @@ local extension = {
|
|||||||
bbappend = 'bitbake',
|
bbappend = 'bitbake',
|
||||||
bbclass = 'bitbake',
|
bbclass = 'bitbake',
|
||||||
bl = 'blank',
|
bl = 'blank',
|
||||||
|
bsd = 'bsdl',
|
||||||
bsdl = 'bsdl',
|
bsdl = 'bsdl',
|
||||||
bst = 'bst',
|
bst = 'bst',
|
||||||
btm = function(path, bufnr)
|
btm = function(path, bufnr)
|
||||||
@ -1668,7 +1669,6 @@ local pattern = {
|
|||||||
['.*/build/conf/.*%.conf'] = 'bitbake',
|
['.*/build/conf/.*%.conf'] = 'bitbake',
|
||||||
['.*/meta/conf/.*%.conf'] = 'bitbake',
|
['.*/meta/conf/.*%.conf'] = 'bitbake',
|
||||||
['.*/meta%-.*/conf/.*%.conf'] = 'bitbake',
|
['.*/meta%-.*/conf/.*%.conf'] = 'bitbake',
|
||||||
['.*bsd'] = 'bsdl',
|
|
||||||
['bzr_log%..*'] = 'bzr',
|
['bzr_log%..*'] = 'bzr',
|
||||||
['.*enlightenment/.*%.cfg'] = 'c',
|
['.*enlightenment/.*%.cfg'] = 'c',
|
||||||
['cabal%.project%..*'] = starsetf('cabalproject'),
|
['cabal%.project%..*'] = starsetf('cabalproject'),
|
||||||
|
@ -43,7 +43,9 @@ func Test_other_type()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Filetypes detected just from matching the file name.
|
" Filetypes detected just from matching the file name.
|
||||||
|
" First one is checking that these files have no filetype.
|
||||||
let s:filename_checks = {
|
let s:filename_checks = {
|
||||||
|
\ 'none': ['bsd', 'some-bsd'],
|
||||||
\ '8th': ['file.8th'],
|
\ '8th': ['file.8th'],
|
||||||
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
|
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
|
||||||
\ 'a65': ['file.a65'],
|
\ 'a65': ['file.a65'],
|
||||||
@ -85,7 +87,7 @@ let s:filename_checks = {
|
|||||||
\ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
|
\ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
|
||||||
\ 'bitbake': ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
|
\ 'bitbake': ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
|
||||||
\ 'blank': ['file.bl'],
|
\ 'blank': ['file.bl'],
|
||||||
\ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
|
\ 'bsdl': ['file.bsd', 'file.bsdl'],
|
||||||
\ 'bst': ['file.bst'],
|
\ 'bst': ['file.bst'],
|
||||||
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
|
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
|
||||||
\ 'bzr': ['bzr_log.any', 'bzr_log.file'],
|
\ 'bzr': ['bzr_log.any', 'bzr_log.file'],
|
||||||
@ -647,7 +649,8 @@ func CheckItems(checks)
|
|||||||
if &filetype == '' && &readonly
|
if &filetype == '' && &readonly
|
||||||
" File exists but not able to edit it (permission denied)
|
" File exists but not able to edit it (permission denied)
|
||||||
else
|
else
|
||||||
call assert_equal(ft, &filetype, 'with file name: ' . names[i])
|
let expected = ft == 'none' ? '' : ft
|
||||||
|
call assert_equal(expected, &filetype, 'with file name: ' . names[i])
|
||||||
endif
|
endif
|
||||||
bwipe!
|
bwipe!
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user