mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Support git grep --column
Closes https://github.com/tpope/vim-fugitive/issues/1168
This commit is contained in:
@@ -2794,7 +2794,10 @@ function! s:Grep(cmd,bang,arg) abort
|
|||||||
try
|
try
|
||||||
let cdback = s:Cd(s:Tree())
|
let cdback = s:Cd(s:Tree())
|
||||||
let &grepprg = s:UserCommand() . ' --no-pager grep -n --no-color'
|
let &grepprg = s:UserCommand() . ' --no-pager grep -n --no-color'
|
||||||
let &grepformat = '%f:%l:%m,%m %f match%ts,%f'
|
let &grepformat = '%f:%l:%c:%m,%f:%l:%m,%m %f match%ts,%f'
|
||||||
|
if fugitive#GitVersion(2, 19)
|
||||||
|
let &grepprg .= ' --column'
|
||||||
|
endif
|
||||||
exe a:cmd.'! '.escape(s:ShellExpand(matchstr(a:arg, '\v\C.{-}%($|[''" ]\@=\|)@=')), '|#%')
|
exe a:cmd.'! '.escape(s:ShellExpand(matchstr(a:arg, '\v\C.{-}%($|[''" ]\@=\|)@=')), '|#%')
|
||||||
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
|
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
|
||||||
for entry in list
|
for entry in list
|
||||||
|
|||||||
Reference in New Issue
Block a user