Use a custom pathshorten

This commit is contained in:
Kien N 2012-05-29 13:48:56 +07:00
parent b1035a2c6d
commit 96bd4b37f4

View File

@ -1170,7 +1170,12 @@ endf
" Paths {{{2
fu! s:formatline(str)
let cond = s:ispath && ( s:winw - 4 ) < s:strwidth(a:str)
retu '> '.( cond ? pathshorten(a:str) : a:str )
retu '> '.( cond ? s:pathshorten(a:str) : a:str )
endf
fu! s:pathshorten(str)
retu matchstr(a:str, '^.\{9}').'...'
\ .matchstr(a:str, '.\{'.( s:winw - 16 ).'}$')
endf
fu! s:dircompl(be, sd)