Merge pull request #526 from bennidhamma/master

Fix #462 - Configurable head limit.
This commit is contained in:
Bailey Ling 2014-05-22 00:03:32 -04:00
commit 44bf6fd1c5
2 changed files with 11 additions and 1 deletions

View File

@ -65,6 +65,13 @@ function! airline#extensions#branch#head()
let b:airline_head = ''
endif
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
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…'
endif
endif
return b:airline_head
endfunction

View File

@ -282,7 +282,10 @@ vcscommand <http://www.vim.org/scripts/script.php?script_id=90>
* use vcscommand.vim if available >
let g:airline#extensions#branch#use_vcscommand = 0
<
* truncate long branch names to a fixed length >
let g:airline#extensions#branch#displayed_head_limit = 10
------------------------------------- *airline-syntastic*
syntastic <https://github.com/scrooloose/syntastic>