mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-07 04:34:27 +08:00
Update for forthcoming :Gbrowse handler changes
This commit is contained in:
@@ -215,7 +215,7 @@ function! rhubarb#fugitive_url(opts, ...) abort
|
|||||||
endif
|
endif
|
||||||
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$'
|
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =~# '/$'
|
||||||
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
let url = substitute(root . '/tree/' . commit . '/' . path, '/$', '', 'g')
|
||||||
elseif a:opts.type == 'blob'
|
elseif get(a:opts, 'type', '') ==# 'blob' || a:opts.path =~# '[^/]$'
|
||||||
let url = root . '/blob/' . commit . '/' . path
|
let url = root . '/blob/' . commit . '/' . path
|
||||||
if get(a:opts, 'line2') && a:opts.line1 == a:opts.line2
|
if get(a:opts, 'line2') && a:opts.line1 == a:opts.line2
|
||||||
let url .= '#L' . a:opts.line1
|
let url .= '#L' . a:opts.line1
|
||||||
|
|||||||
Reference in New Issue
Block a user