From 2667cfd9a0fed02e3d65b599edada56c3b9ebcef Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 14 Oct 2009 18:57:11 -0400 Subject: [PATCH] No backtrace on :Ggrep buffer abandonment failure --- plugin/fugitive.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 67f1ab7..196d886 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -453,7 +453,7 @@ call s:command("-bar -bang -nargs=? -complete=customlist,s:DirComplete Glcd :lcd " }}}1 " Ggrep, Glog {{{1 -call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Ggrep :call s:Grep(0,)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Ggrep :execute s:Grep(0,)") call s:command("-bar -bang Glog :execute s:Log('grep')") function! s:Grep(bang,arg) abort @@ -478,7 +478,9 @@ function! s:Grep(bang,arg) abort endfor call setqflist(list,'r') if !a:bang && !empty(list) - cfirst + return 'cfirst' + else + return '' endif finally let &grepprg = grepprg