allow displayed_head_limit to work alongside format. resolves #729.

This commit is contained in:
Bailey Ling 2015-03-14 12:25:57 -04:00
parent 5e1cc0a28b
commit 5dc0cc5418
1 changed files with 2 additions and 1 deletions

View File

@ -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