From caf3b1d5696e8d39a905e48f1e89d8c0c565168c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 17 Apr 2020 16:20:35 -0400 Subject: [PATCH] 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. --- autoload/fugitive.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a9bd130..78a572c 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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}'