Fix fugitive#Real() with non-Fugitive URL

This commit is contained in:
Tim Pope
2018-07-29 00:20:35 -04:00
parent 64fbfc7a8d
commit a8392e0ebb

View File

@@ -511,7 +511,7 @@ function! fugitive#Real(url) abort
let tree = s:Tree(dir) let tree = s:Tree(dir)
return s:PlatformSlash((len(tree) ? tree : dir) . file) return s:PlatformSlash((len(tree) ? tree : dir) . file)
endif endif
let url = len(url) ? fnamemodify(a:url, ':p' . (a:url =~# '[\/]$' ? '' : ':s?[\/]$??')) : '' let url = len(a:url) ? fnamemodify(a:url, ':p' . (a:url =~# '[\/]$' ? '' : ':s?[\/]$??')) : ''
if url =~# '^[\\/]\|^\a:[\\/]' if url =~# '^[\\/]\|^\a:[\\/]'
return s:PlatformSlash(url) return s:PlatformSlash(url)
endif endif