From 5dc0cc54180bd757a37c9828d5229956979cd654 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sat, 14 Mar 2015 12:25:57 -0400 Subject: [PATCH] allow displayed_head_limit to work alongside format. resolves #729. --- autoload/airline/extensions/branch.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index f779fc9..7ad4650 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -87,6 +87,8 @@ function! airline#extensions#branch#head() let b:airline_head = '' endif + let b:airline_head = s:format_name(b:airline_head) + if exists("g:airline#extensions#branch#displayed_head_limit") let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit if len(b:airline_head) > w:displayed_head_limit - 1 @@ -94,7 +96,6 @@ function! airline#extensions#branch#head() endif endif - let b:airline_head = s:format_name(b:airline_head) return b:airline_head endfunction