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:
parent
0b537b3065
commit
262fdc20d5
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue