Fix :GBrowse - destination

This commit is contained in:
Tim Pope
2021-09-23 14:02:10 -04:00
parent 142a0dc0c4
commit 915c050724

View File

@@ -7145,12 +7145,10 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, ...) abor
for line in readfile(result.file, '', 4096) for line in readfile(result.file, '', 4096)
let rev = s:fnameescape(matchstr(line, '\<https\=://[^[:space:]<>]*[^[:space:]<>.,;:"''!?]')) let rev = s:fnameescape(matchstr(line, '\<https\=://[^[:space:]<>]*[^[:space:]<>.,;:"''!?]'))
if len(rev) if len(rev)
break return s:BrowserOpen(rev, a:mods, a:bang)
endif endif
endfor endfor
if empty(rev) return 'echoerr ' . string('fugitive: no URL found in output of :Git')
return 'echoerr ' . string('fugitive: no URL found in output of :Git')
endif
endif endif
exe s:DirCheck(dir) exe s:DirCheck(dir)
if empty(expanded) if empty(expanded)