[Files] Port junegunn/fzf/pull/1043 (#442)
This commit is contained in:
parent
e7928d154a
commit
2fd046fa76
1 changed files with 4 additions and 1 deletions
|
@ -263,7 +263,10 @@ endfunction
|
|||
" Files
|
||||
" ------------------------------------------------------------------
|
||||
function! s:shortpath()
|
||||
let short = pathshorten(fnamemodify(getcwd(), ':~:.'))
|
||||
let short = fnamemodify(getcwd(), ':~:.')
|
||||
if !has('win32unix')
|
||||
let short = pathshorten(short)
|
||||
endif
|
||||
let slash = (s:is_win && !&shellslash) ? '\' : '/'
|
||||
return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)
|
||||
endfunction
|
||||
|
|
Loading…
Add table
Reference in a new issue