diff --git a/autoload/airline/extensions/wordcount.vim b/autoload/airline/extensions/wordcount.vim index 4bb2563..e424f5e 100644 --- a/autoload/airline/extensions/wordcount.vim +++ b/autoload/airline/extensions/wordcount.vim @@ -16,11 +16,13 @@ function! s:update() else if get(b:, 'airline_wordcount_cache', '') is# '' || \ b:airline_wordcount_cache isnot# get(b:, 'airline_wordcount', '') || - \ get(b:, 'airline_change_tick', 0) != b:changedtick + \ get(b:, 'airline_change_tick', 0) != b:changedtick || + \ get(b:, 'airline_winwidth', 0) != winwidth(0) " cache data let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() let b:airline_wordcount_cache = b:airline_wordcount let b:airline_change_tick = b:changedtick + let b:airline_winwidth = winwidth(0) endif endif endif