mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Support browsing with new netrw.vim
The previous fix for #594 didn't handle the case in which the net netrw was installed on older versions of Vim.
This commit is contained in:
@@ -2225,7 +2225,10 @@ function! s:Browse(bang,line1,count,...) abort
|
|||||||
elseif exists(':Browse') == 2
|
elseif exists(':Browse') == 2
|
||||||
return 'echomsg '.string(url).'|Browse '.url
|
return 'echomsg '.string(url).'|Browse '.url
|
||||||
else
|
else
|
||||||
if has("patch-7.4.567")
|
if !exists('g:loaded_netrw')
|
||||||
|
runtime! autoload/netrw.vim
|
||||||
|
endif
|
||||||
|
if exists('*netrw#BrowseX')
|
||||||
return 'echomsg '.string(url).'|call netrw#BrowseX('.string(url).', 0)'
|
return 'echomsg '.string(url).'|call netrw#BrowseX('.string(url).', 0)'
|
||||||
else
|
else
|
||||||
return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
||||||
|
|||||||
Reference in New Issue
Block a user