mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
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:
@@ -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}'
|
||||
|
||||
Reference in New Issue
Block a user