diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index f01f208..ba75c69 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1303,8 +1303,17 @@ endf " *** Paths {{{2 " Line formatting {{{3 fu! s:formatline(str) - let cond = s:ispath && ( s:winw - 4 ) < s:strwidth(a:str) - retu '> '.( cond ? s:pathshorten(a:str) : a:str ) + let str = a:str + if s:itemtype == 1 + let bfnr = bufnr('^'.fnamemodify(str, ':p').'$') + let idc = ( bfnr == bufnr('#') ? '#' : '' ) + \ . ( getbufvar(bfnr, '&ma') ? '' : '-' ) + \ . ( getbufvar(bfnr, '&ro') ? '=' : '' ) + \ . ( getbufvar(bfnr, '&mod') ? '+' : '' ) + let str .= idc != '' ? ' '.idc : '' + en + let cond = s:ispath && ( s:winw - 4 ) < s:strwidth(str) + retu '> '.( cond ? s:pathshorten(str) : str ) endf fu! s:pathshorten(str) diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index 9431009..38b3f45 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -1240,6 +1240,7 @@ Special thanks:~ * Seth Fowler * Lowe Thiderman * Christopher Fredén + * Zahary Karadjov =============================================================================== CHANGELOG *ctrlp-changelog*