From a3ab24f68148c838597567e9cb88b81427f5ea60 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 29 Jul 2019 13:19:44 -0400 Subject: [PATCH] Fire synthetic QuickFix events on :Ggrep References https://github.com/tpope/vim-fugitive/issues/1297 --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 84ec203..fbebed1 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3502,10 +3502,13 @@ function! s:Grep(type, bang, arg) abort let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)}) let tempfile = tempname() + if v:version > 704 | exe 'silent doautocmd QuickFixCmdPre ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif exe '!' . escape(s:shellesc(cmd + args), '%#!') \ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile)) let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)') call s:QuickfixSet(listnr, list, 'a') + if v:version > 704 | exe 'silent doautocmd QuickFixCmdPost ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif + redraw if !a:bang && !empty(list) call s:BlurStatus() return (listnr < 0 ? 'c' : 'l').'first' . after