wordcount: Re-enable updating the format string

This commit is contained in:
Liam Fleming 2018-09-18 20:09:22 +01:00
parent c33c1de079
commit 0756b9a4aa
1 changed files with 8 additions and 2 deletions

View File

@ -3,8 +3,14 @@
scriptencoding utf-8
function s:update_fmt(...)
let s:fmt = get(g:, 'airline#extensions#wordcount#formatter#default#fmt', '%s words')
let s:fmt_short = get(g:, 'airline#extensions#wordcount#formatter#default#fmt_short', s:fmt == '%s words' ? '%sW' : s:fmt)
endfunction
" Reload format when statusline is rebuilt
call s:update_fmt()
call airline#add_statusline_funcref(function('s:update_fmt'))
if match(get(v:, 'lang', ''), '\v\cC|en') > -1
let s:decimal_group = ','