Don't gratuitously clobber quickfix in :Ggrep
This commit is contained in:
parent
2b05b275f5
commit
99809a021c
@ -1070,14 +1070,16 @@ function! s:Grep(cmd,bang,arg) abort
|
||||
if bufname(entry.bufnr) =~ ':'
|
||||
let entry.filename = s:repo().translate(bufname(entry.bufnr))
|
||||
unlet! entry.bufnr
|
||||
let changed = 1
|
||||
elseif a:arg =~# '\%(^\| \)--cached\>'
|
||||
let entry.filename = s:repo().translate(':0:'.bufname(entry.bufnr))
|
||||
unlet! entry.bufnr
|
||||
let changed = 1
|
||||
endif
|
||||
endfor
|
||||
if a:cmd =~# '^l'
|
||||
if a:cmd =~# '^l' && exists('changed')
|
||||
call setloclist(0, list, 'r')
|
||||
else
|
||||
elseif exists('changed')
|
||||
call setqflist(list, 'r')
|
||||
endif
|
||||
if !a:bang && !empty(list)
|
||||
|
Loading…
Reference in New Issue
Block a user