diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 94cf8d0..2de6192 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5618,7 +5618,7 @@ augroup fugitive_blame autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('')), 'fugitive_leave') augroup END -" Section: :Gbrowse +" Section: :GBrowse let s:redirects = {} @@ -5631,7 +5631,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo if a:count >= 0 return 'echoerr ' . string('fugitive: ''-'' no longer required to get persistent URL if range given') else - return 'echoerr ' . string('fugitive: use :0Gbrowse instead of :Gbrowse -') + return 'echoerr ' . string('fugitive: use :0GBrowse instead of :GBrowse -') endif elseif len(a:args) let remote = matchstr(join(a:args, ' '),'@\zs\%('.validremote.'\)$') @@ -5822,7 +5822,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo endif if empty(url) - call s:throw("No Gbrowse handler installed for '".raw."'") + call s:throw("No GBrowse handler installed for '".raw."'") endif let url = s:gsub(url, '[ <>]', '\="%".printf("%02X",char2nr(submatch(0)))') @@ -5833,14 +5833,18 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo return 'echomsg '.string(url) elseif exists(':Browse') == 2 return 'echomsg '.string(url).'|Browse '.url + elseif exists(':OpenBrowser') == 2 + return 'echomsg '.string(url).'|OpenBrowser '.url else if !exists('g:loaded_netrw') runtime! autoload/netrw.vim endif if exists('*netrw#BrowseX') return 'echomsg '.string(url).'|call netrw#BrowseX('.string(url).', 0)' - else + elseif exists('*netrw#NetrwBrowseX') return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)' + else + return 'echoerr ' . string('Netrw not found. Define your own :Browse to use :GBrowse') endif endif catch /^fugitive:/