wordcount: use the short format for widths <= 85

Previously it used a width of >= 80 to display the long word count
format. However I personally found that a bit too wide, while other
sections will be shortened too much which does not really look nice.

Therefore, adjust the limit a bit, using the short word count format for
windows up to 85 characters.
This commit is contained in:
Christian Brabandt 2019-10-02 14:50:35 +02:00
parent 0b537b3065
commit 262fdc20d5
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ else
endif
function! airline#extensions#wordcount#formatters#default#to_string(wordcount)
if airline#util#winwidth() >= 80
if airline#util#winwidth() > 85
if a:wordcount > 999
" Format number according to locale, e.g. German: 1.245 or English: 1,245
let wordcount = substitute(a:wordcount, '\d\@<=\(\(\d\{3\}\)\+\)$', s:decimal_group.'&', 'g')