mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +08:00
[Files] Port junegunn/fzf/pull/1043 (#442)
This commit is contained in:
committed by
Junegunn Choi
parent
e7928d154a
commit
2fd046fa76
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user