tabline: use strpart() with chars if possible (fixes #2297)
This commit is contained in:
parent
a168ca7a28
commit
cbf0a8e69a
|
@ -23,7 +23,11 @@ function! airline#extensions#tabline#formatters#default#format(bufnr, buffers)
|
|||
let _ .= fnamemodify(name, fmod)
|
||||
endif
|
||||
if a:bufnr != bufnr('%') && fnametruncate && strlen(_) > fnametruncate
|
||||
let _ = strpart(_, 0, fnametruncate)
|
||||
if v:version > 802 || (v:version == 802 && has("patch1517"))
|
||||
let _ = strpart(_, 0, fnametruncate, 1)
|
||||
else
|
||||
let _ = strpart(_, 0, fnametruncate)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue