mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Fix resolution of scp style URLs
This commit is contained in:
@@ -1251,7 +1251,7 @@ function! s:UrlParse(url) abort
|
|||||||
let scp_authority = matchstr(a:url, '^[^:/]\+\ze:\%(//\)\@!')
|
let scp_authority = matchstr(a:url, '^[^:/]\+\ze:\%(//\)\@!')
|
||||||
if len(scp_authority) && !(has('win32') && scp_authority =~# '^\a:[\/]')
|
if len(scp_authority) && !(has('win32') && scp_authority =~# '^\a:[\/]')
|
||||||
return {'scheme': 'ssh', 'authority': scp_authority,
|
return {'scheme': 'ssh', 'authority': scp_authority,
|
||||||
\ 'path': strpart(url, len(scp_authority) + 1)}
|
\ 'path': strpart(a:url, len(scp_authority) + 1)}
|
||||||
endif
|
endif
|
||||||
let match = matchlist(a:url, '^\([[:alnum:].+-]\+\)://\([^/]*\)\(/.*\)\=\%(#\|$\)')
|
let match = matchlist(a:url, '^\([[:alnum:].+-]\+\)://\([^/]*\)\(/.*\)\=\%(#\|$\)')
|
||||||
if empty(match)
|
if empty(match)
|
||||||
|
|||||||
Reference in New Issue
Block a user