From 262fdc20d508020c344a3c0dc2623333c2267427 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 2 Oct 2019 14:50:35 +0200 Subject: [PATCH] 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. --- autoload/airline/extensions/wordcount/formatters/default.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/wordcount/formatters/default.vim b/autoload/airline/extensions/wordcount/formatters/default.vim index f18b55f7..fce27eb7 100644 --- a/autoload/airline/extensions/wordcount/formatters/default.vim +++ b/autoload/airline/extensions/wordcount/formatters/default.vim @@ -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')