From 2f9fd6de082aaa707ed9a81ee5c6b035be770d8c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 28 Jul 2012 10:55:32 -0400 Subject: [PATCH] Fix :V* commands when file isn't found --- autoload/pathogen.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim index 3accbe6..173d988 100644 --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -177,7 +177,12 @@ command! -bar Helptags :call pathogen#helptags() " Like findfile(), but hardcoded to use the runtimepath. function! pathogen#runtime_findfile(file,count) "{{{1 let rtp = pathogen#join(1,pathogen#split(&rtp)) - return fnamemodify(findfile(a:file,rtp,a:count),':p') + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif endfunction " }}}1 " Backport of fnameescape().