wordcount: work-around non-existing v:t_list

v:t_list is an internal variable describing the type of a list.
Unfortunately, this is not available in older vims. So let's fall back
to using `type([])`

see #1795
This commit is contained in:
Christian Brabandt 2018-09-20 11:44:17 +02:00
parent 7957bd1d32
commit 82a6097b01
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -89,7 +89,7 @@ function! airline#extensions#wordcount#apply(...)
let s:filetypes = filetypes
" Select test based on type of "filetypes": new=list, old=string
if type(filetypes) == v:t_list
if type(filetypes) == get(v:, 't_list', type([]))
\ ? index(filetypes, &filetype) > -1 || index(filetypes, 'all') > -1
\ : match(&filetype, filetypes) > -1
let b:airline_changedtick = -1