mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:22:53 +08:00
Fix #462 - Configurable head limit.
This commit is contained in:
parent
bfcece76c9
commit
4f904ab0d4
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user