Fix resolution of scp style URLs

This commit is contained in:
Tim Pope
2021-09-19 14:44:28 -04:00
parent 3d67d23f47
commit e1d382b3e7

View File

@@ -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)