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:
Eli Young
2015-02-20 12:47:08 -08:00
committed by Tim Pope
parent eb8eb1850a
commit e8b94098bb

View File

@@ -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)'