do not unconditionally use utf-8 encoding in branch exten

Check, that encoding is utf8 before using '…'
fixes #1061
This commit is contained in:
Christian Brabandt 2016-02-25 11:30:02 +01:00
parent 5cf193fa28
commit 0bfae15d97
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ function! airline#extensions#branch#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
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…'
let b:airline_head = b:airline_head[0:(w:displayed_head_limit - 1)].(&encoding ==? 'utf-8' ? '…' : '.')
endif
endif