mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-23 14:04:53 +02:00
Merge pull request #526 from bennidhamma/master
Fix #462 - Configurable head limit.
This commit is contained in:
commit
44bf6fd1c5
@ -65,6 +65,13 @@ function! airline#extensions#branch#head()
|
|||||||
let b:airline_head = ''
|
let b:airline_head = ''
|
||||||
endif
|
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
|
return b:airline_head
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -282,7 +282,10 @@ vcscommand <http://www.vim.org/scripts/script.php?script_id=90>
|
|||||||
|
|
||||||
* use vcscommand.vim if available >
|
* use vcscommand.vim if available >
|
||||||
let g:airline#extensions#branch#use_vcscommand = 0
|
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*
|
------------------------------------- *airline-syntastic*
|
||||||
syntastic <https://github.com/scrooloose/syntastic>
|
syntastic <https://github.com/scrooloose/syntastic>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user