motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 552baf98b31c5f07eefdab5a67a20767c5b94547 (tree)
parent 58a4a2e1027267e19a07c806111163f60ba0a655
Author: Tim Pope <code@tpope.net>
Date:   Sun, 13 Jan 2019 15:13:37 -0500

Support git grep --column

Closes
https://github.com/tpope/vim-fugitive/issues/1168

Diffstat:
Mautoload/fugitive.vim | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2794,7 +2794,10 @@ function! s:Grep(cmd,bang,arg) abort try let cdback = s:Cd(s:Tree()) 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.{-}%($|[''" ]\@=\|)@=')), '|#%') let list = a:cmd =~# '^l' ? getloclist(0) : getqflist() for entry in list