Reset wordcount cache on window size
so the format can make a better guess what to display on different window sizes.
This commit is contained in:
parent
d8b62aa426
commit
562d060b08
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue