[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
This commit is contained in:
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…
Reference in New Issue
Block a user