safer way to access filetype

This commit is contained in:
John Bintz 2012-05-31 11:05:39 -04:00
parent d1ac211f70
commit e8e00799ac
1 changed files with 1 additions and 1 deletions

View File

@ -960,7 +960,7 @@ endfunction
" will be returned
function! s:Tlist_Fix_Ftype(raw_ftype)
if match(a:raw_ftype, '\.')
return split(a:raw_ftype, '\.')[0]
return get(split(a:raw_ftype, '\.'), 0, a:raw_ftype)
else
return a:raw_ftype
endif