Don't default :Git grep to --column

If you want this, you can pass --column yourself, or set the grep.column
config option.  This is probably going to change for :Ggrep, too.
This commit is contained in:
Tim Pope
2020-04-17 16:20:35 -04:00
parent f17a91d010
commit caf3b1d569

View File

@@ -4151,9 +4151,6 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, options) abort
exe s:DirCheck(dir)
let listnr = a:line1 == 0 ? a:line1 : a:line2
let cmd = ['--no-pager', 'grep', '-n', '--no-color', '--full-name']
if fugitive#GitVersion(2, 19)
call add(cmd, '--column')
endif
let tree = s:Tree(dir)
let args = a:options.args
if get(args, 0, '') =~# '^-O\|--open-files-in-pager$'
@@ -4191,7 +4188,7 @@ endfunction
function! fugitive#GrepCommand(line1, line2, range, bang, mods, arg) abort
return fugitive#Command(a:line1, a:line2, a:range, a:bang, a:mods,
\ "grep -O " . a:arg)
\ "grep -O " . (fugitive#GitVersion(2, 19) ? "--column " : "") . a:arg)
endfunction
let s:log_diff_context = '{"filename": fugitive#Find(v:val . from, a:dir), "lnum": get(offsets, v:key), "module": strpart(v:val, 0, len(a:state.base_module)) . from}'