forked from aniani/vim
patch 8.2.3491: xpm2 filetype dection is not so good
Problem: xpm2 filetype dection is not so good. Solution: Adjust the check for xpm2. (closes #8914)
This commit is contained in:
@@ -555,6 +555,7 @@ let s:filename_checks = {
|
|||||||
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd'],
|
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd'],
|
||||||
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
|
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
|
||||||
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
||||||
|
\ 'xpm': ['file.xpm'],
|
||||||
\ 'xpm2': ['file.xpm2'],
|
\ 'xpm2': ['file.xpm2'],
|
||||||
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
|
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
|
||||||
\ 'xs': ['file.xs'],
|
\ 'xs': ['file.xs'],
|
||||||
@@ -569,7 +570,6 @@ let s:filename_checks = {
|
|||||||
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
|
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
|
||||||
\
|
\
|
||||||
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
|
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
|
||||||
\ 'xpm': ['file.xpm'],
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
let s:filename_case_checks = {
|
let s:filename_case_checks = {
|
||||||
@@ -943,4 +943,17 @@ func Test_m_file()
|
|||||||
call delete('Xfile.m')
|
call delete('Xfile.m')
|
||||||
filetype off
|
filetype off
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_xpm_file()
|
||||||
|
filetype on
|
||||||
|
|
||||||
|
call writefile(['this is XPM2'], 'file.xpm')
|
||||||
|
split file.xpm
|
||||||
|
call assert_equal('xpm2', &filetype)
|
||||||
|
bwipe!
|
||||||
|
|
||||||
|
call delete('file.xpm')
|
||||||
|
filetype off
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3491,
|
||||||
/**/
|
/**/
|
||||||
3490,
|
3490,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user