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:
parent
7957bd1d32
commit
82a6097b01
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user