mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 23:33:43 -05:00
Use :echo not :echomsg for displaying :GBrowse URL
Logging the URL permanently to :messages was a mistake.
This commit is contained in:
@@ -6264,19 +6264,19 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo
|
|||||||
if has('clipboard')
|
if has('clipboard')
|
||||||
let @+ = url
|
let @+ = url
|
||||||
endif
|
endif
|
||||||
return 'echomsg '.string(url)
|
return 'echo '.string(url)
|
||||||
elseif exists(':Browse') == 2
|
elseif exists(':Browse') == 2
|
||||||
return 'echomsg '.string(url).'|Browse '.url
|
return 'echo '.string(url).'|Browse '.url
|
||||||
elseif exists(':OpenBrowser') == 2
|
elseif exists(':OpenBrowser') == 2
|
||||||
return 'echomsg '.string(url).'|OpenBrowser '.url
|
return 'echo '.string(url).'|OpenBrowser '.url
|
||||||
else
|
else
|
||||||
if !exists('g:loaded_netrw')
|
if !exists('g:loaded_netrw')
|
||||||
runtime! autoload/netrw.vim
|
runtime! autoload/netrw.vim
|
||||||
endif
|
endif
|
||||||
if exists('*netrw#BrowseX')
|
if exists('*netrw#BrowseX')
|
||||||
return 'echomsg '.string(url).'|call netrw#BrowseX('.string(url).', 0)'
|
return 'echo '.string(url).'|call netrw#BrowseX('.string(url).', 0)'
|
||||||
elseif exists('*netrw#NetrwBrowseX')
|
elseif exists('*netrw#NetrwBrowseX')
|
||||||
return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
return 'echo '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
||||||
else
|
else
|
||||||
return 'echoerr ' . string('Netrw not found. Define your own :Browse to use :GBrowse')
|
return 'echoerr ' . string('Netrw not found. Define your own :Browse to use :GBrowse')
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user