mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-09 05:54:46 +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
|
" Files
|
||||||
" ------------------------------------------------------------------
|
" ------------------------------------------------------------------
|
||||||
function! s:shortpath()
|
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) ? '\' : '/'
|
let slash = (s:is_win && !&shellslash) ? '\' : '/'
|
||||||
return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)
|
return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user