Fix version check for doautocmd <nomodeline>
This commit is contained in:
parent
22e9b26075
commit
86c276d629
@ -3728,12 +3728,12 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, args) abort
|
|||||||
redraw
|
redraw
|
||||||
call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)})
|
call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)})
|
||||||
let tempfile = tempname()
|
let tempfile = tempname()
|
||||||
if v:version > 704 | exe 'silent doautocmd <nomodeline> QuickFixCmdPre ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif
|
if v:version >= 704 | exe 'silent doautocmd <nomodeline> QuickFixCmdPre ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif
|
||||||
exe '!' . escape(s:UserCommand(dir, cmd + args), '%#!')
|
exe '!' . escape(s:UserCommand(dir, cmd + args), '%#!')
|
||||||
\ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile))
|
\ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile))
|
||||||
let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)')
|
let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)')
|
||||||
call s:QuickfixSet(listnr, list, 'a')
|
call s:QuickfixSet(listnr, list, 'a')
|
||||||
if v:version > 704 | exe 'silent doautocmd <nomodeline> QuickFixCmdPost ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif
|
if v:version >= 704 | exe 'silent doautocmd <nomodeline> QuickFixCmdPost ' (listnr < 0 ? 'Ggrep' : 'Glgrep') | endif
|
||||||
if !has('gui_running')
|
if !has('gui_running')
|
||||||
redraw
|
redraw
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user