From e8b94098bbecde6e394848d490d34906964fb809 Mon Sep 17 00:00:00 2001 From: Eli Young Date: Fri, 20 Feb 2015 12:47:08 -0800 Subject: [PATCH] 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. --- plugin/fugitive.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index b61e49c..3043208 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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)'