safer way to access filetype
This commit is contained in:
parent
d1ac211f70
commit
e8e00799ac
|
@ -960,7 +960,7 @@ endfunction
|
||||||
" will be returned
|
" will be returned
|
||||||
function! s:Tlist_Fix_Ftype(raw_ftype)
|
function! s:Tlist_Fix_Ftype(raw_ftype)
|
||||||
if match(a:raw_ftype, '\.')
|
if match(a:raw_ftype, '\.')
|
||||||
return split(a:raw_ftype, '\.')[0]
|
return get(split(a:raw_ftype, '\.'), 0, a:raw_ftype)
|
||||||
else
|
else
|
||||||
return a:raw_ftype
|
return a:raw_ftype
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue