Use blamed file when calling :Gbrowse in blame buffer

This commit is contained in:
Tim Pope
2019-02-23 16:49:19 -05:00
parent 1a3c04585b
commit 66073d955d

View File

@@ -626,7 +626,11 @@ function! fugitive#Path(url, ...) abort
endwhile
return a:1[0:-2] . path
endif
let url = s:Slash(fnamemodify(a:url, ':p'))
let url = a:url
if has_key(get(s:temp_files, s:cpath(url), {}), 'bufnr')
let url = bufname(s:temp_files[s:cpath(url)].bufnr)
endif
let url = s:Slash(fnamemodify(url, ':p'))
if url =~# '/$' && s:Slash(a:url) !~# '/$'
let url = url[0:-2]
endif