mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Support for Ggrep when only %f is available
This commit is contained in:
committed by
Tim Pope
parent
7c4a906147
commit
03cc95cc19
@@ -1253,7 +1253,7 @@ function! s:Grep(cmd,bang,arg) abort
|
||||
try
|
||||
execute cd.'`=s:repo().tree()`'
|
||||
let &grepprg = s:repo().git_command('--no-pager', 'grep', '-n', '--no-color')
|
||||
let &grepformat = '%f:%l:%m'
|
||||
let &grepformat = '%f:%l:%m,%f'
|
||||
exe a:cmd.'! '.escape(matchstr(a:arg,'\v\C.{-}%($|[''" ]\@=\|)@='),'|')
|
||||
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
|
||||
for entry in list
|
||||
|
||||
Reference in New Issue
Block a user