diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index dc39d48..5995497 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3728,12 +3728,12 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort redraw 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 + if v:version >= 704 | exe 'silent doautocmd QuickFixCmdPre ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif exe '!' . escape(s:UserCommand(dir, 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 + if v:version >= 704 | exe 'silent doautocmd QuickFixCmdPost ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif if !has('gui_running') redraw endif