mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-26 03:27:12 +08:00
Fix #462 - Configurable head limit.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user