mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Make Ggrep to work properly on Mac
- Color were causing to appear strange characters in the result. - These characters made impossible to navigate the results - The solution was to disable colors while executing git grep
This commit is contained in:
@@ -1239,7 +1239,7 @@ function! s:Grep(cmd,bang,arg) abort
|
|||||||
let dir = getcwd()
|
let dir = getcwd()
|
||||||
try
|
try
|
||||||
execute cd.'`=s:repo().tree()`'
|
execute cd.'`=s:repo().tree()`'
|
||||||
let &grepprg = s:repo().git_command('--no-pager', 'grep', '-n')
|
let &grepprg = s:repo().git_command('--no-pager', 'grep', '-n', '--no-color')
|
||||||
let &grepformat = '%f:%l:%m'
|
let &grepformat = '%f:%l:%m'
|
||||||
exe a:cmd.'! '.escape(matchstr(a:arg,'\v\C.{-}%($|[''" ]\@=\|)@='),'|')
|
exe a:cmd.'! '.escape(matchstr(a:arg,'\v\C.{-}%($|[''" ]\@=\|)@='),'|')
|
||||||
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
|
let list = a:cmd =~# '^l' ? getloclist(0) : getqflist()
|
||||||
|
|||||||
Reference in New Issue
Block a user