From 044a90ed55b05ce522214262d3cb1a6ed8391e98 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 4 Jun 2018 21:45:46 +0200 Subject: [PATCH] use get(v:, 'lang', '') instead of v:lang closes #1735 --- autoload/airline/extensions/wordcount/formatters/default.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/wordcount/formatters/default.vim b/autoload/airline/extensions/wordcount/formatters/default.vim index e8167903..d7b5faea 100644 --- a/autoload/airline/extensions/wordcount/formatters/default.vim +++ b/autoload/airline/extensions/wordcount/formatters/default.vim @@ -57,9 +57,9 @@ function! s:wordcount() endfunction function! s:get_decimal_group() - if match(v:lang, '\v\cC|en') > -1 + if match(get(v:, 'lang', ''), '\v\cC|en') > -1 return ',' - elseif match(v:lang, '\v\cde|dk|fr|pt') > -1 + elseif match(get(v:, 'lang', ''), '\v\cde|dk|fr|pt') > -1 return '.' endif return ''