Avoid :Ggrep interrupt leaving behind result without file

This commit is contained in:
Tim Pope
2021-08-19 16:43:45 -04:00
parent 0cbc28ba33
commit 01e843c21d

View File

@@ -5256,10 +5256,10 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, options) abort
\ 'file': s:Resolve(tempfile)} \ 'file': s:Resolve(tempfile)}
let event = listnr < 0 ? 'grep-fugitive' : 'lgrep-fugitive' let event = listnr < 0 ? 'grep-fugitive' : 'lgrep-fugitive'
silent exe s:DoAutocmd('QuickFixCmdPre ' . event) silent exe s:DoAutocmd('QuickFixCmdPre ' . event)
call s:RunSave(state)
echo title echo title
let list = s:SystemList(s:UserCommandList(a:options) + cmd + args)[0] let list = s:SystemList(s:UserCommandList(a:options) + cmd + args)[0]
call writefile(list + [''], tempfile, 'b') call writefile(list + [''], tempfile, 'b')
call s:RunSave(state)
try try
if &more if &more
let more = 1 let more = 1