No backtrace on :Ggrep buffer abandonment failure

This commit is contained in:
Tim Pope 2009-10-14 18:57:11 -04:00
parent 7a281a925c
commit 2667cfd9a0

View File

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