From 82a6097b0114e3aa4c72bac3425923eea3cbb329 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 20 Sep 2018 11:44:17 +0200 Subject: [PATCH] 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 --- autoload/airline/extensions/wordcount.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/wordcount.vim b/autoload/airline/extensions/wordcount.vim index 7486929c..d569ea84 100644 --- a/autoload/airline/extensions/wordcount.vim +++ b/autoload/airline/extensions/wordcount.vim @@ -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