[vim] Do not pathshorten prompt in cygwin (#1043)

Prevents the following case:
before pathshorten - /usr/bin
after pathshorten - /u/bin
piped to cmd.exe - U:/bin
pull/1047/head
Jan Edmund Lazo 7 years ago committed by Junegunn Choi
parent 5edc3f755c
commit 79d2ef4616

@ -772,7 +772,10 @@ let s:default_action = {
\ 'ctrl-v': 'vsplit' }
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…
Cancel
Save