From 61a5e0143ee506f4780dc8b4b4ca06fe48bb4467 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 22 Feb 2018 11:06:34 +0000 Subject: [PATCH] Do not warn user when default grep cannot be found. This restores the behaviour that was accidentally changed in 5bfe5b9. --- plugin/gitgutter.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index 6ac15ea..ecd75d8 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -61,10 +61,13 @@ if !executable(g:gitgutter_git_executable) call gitgutter#utility#warn('cannot find git. Please set g:gitgutter_git_executable.') endif -call s:set('g:gitgutter_grep', 'grep') +let default_grep = 'grep' +call s:set('g:gitgutter_grep', default_grep) if !empty(g:gitgutter_grep) if !executable(g:gitgutter_grep) - call gitgutter#utility#warn('cannot find '.g:gitgutter_grep.'. Please set g:gitgutter_grep.') + if g:gitgutter_grep !=# default_grep + call gitgutter#utility#warn('cannot find '.g:gitgutter_grep.'. Please check g:gitgutter_grep.') + endif let g:gitgutter_grep = '' else if $GREP_OPTIONS =~# '--color=always'