mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-07 12:44:39 +08: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:
1 parent
eb8eb1850a
commit
e8b94098bb
1 file changed
+4
-1
+4
-1
@@ -2225,7 +2225,10 @@ function! s:Browse(bang,line1,count,...) abort
|
||||
elseif exists(':Browse') == 2
|
||||
return 'echomsg '.string(url).'|Browse '.url
|
||||
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)'
|
||||
else
|
||||
return 'echomsg '.string(url).'|call netrw#NetrwBrowseX('.string(url).', 0)'
|
||||
|
||||
Reference in new issue
Block a user