commit 2667cfd9a0fed02e3d65b599edada56c3b9ebcef (tree)
parent 7a281a925c07e0ef3fb082164e441ee3cecab124
Author: Tim Pope <code@tpope.net>
Date: Wed, 14 Oct 2009 18:57:11 -0400
No backtrace on :Ggrep buffer abandonment failure
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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(<bang>0,<q-args>)")
+call s:command("-bar -bang -nargs=? -complete=customlist,s:EditComplete Ggrep :execute s:Grep(<bang>0,<q-args>)")
call s:command("-bar -bang Glog :execute s:Log('grep<bang>')")
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