diff --git a/autoload/airline/extensions/tabline/formatters/default.vim b/autoload/airline/extensions/tabline/formatters/default.vim index d8b2ec05..ebb9adf3 100644 --- a/autoload/airline/extensions/tabline/formatters/default.vim +++ b/autoload/airline/extensions/tabline/formatters/default.vim @@ -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