From f16cf539a23fc980af1293bebdae61a595baa90c Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 20 Apr 2017 12:37:52 +0100 Subject: [PATCH] Turn off grep colour when GREP_OPTIONS switches it on. Closes #415. --- autoload/gitgutter/diff.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/gitgutter/diff.vim b/autoload/gitgutter/diff.vim index a10e69f..2cf7acf 100644 --- a/autoload/gitgutter/diff.vim +++ b/autoload/gitgutter/diff.vim @@ -5,6 +5,9 @@ else let s:grep_available = executable('grep') if s:grep_available let s:grep_command = 'grep' + if $GREP_OPTIONS =~# '--color=always' + let s:grep_command .= ' --color=never' + endif endif endif let s:hunk_re = '^@@ -\(\d\+\),\?\(\d*\) +\(\d\+\),\?\(\d*\) @@'