Do not warn user when default grep cannot be found.

This restores the behaviour that was accidentally changed in 5bfe5b9.
This commit is contained in:
Andy Stewart
2018-02-22 11:06:34 +00:00
parent e9aee00190
commit 61a5e0143e

View File

@@ -61,10 +61,13 @@ if !executable(g:gitgutter_git_executable)
call gitgutter#utility#warn('cannot find git. Please set g:gitgutter_git_executable.') call gitgutter#utility#warn('cannot find git. Please set g:gitgutter_git_executable.')
endif 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 !empty(g:gitgutter_grep)
if !executable(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 = '' let g:gitgutter_grep = ''
else else
if $GREP_OPTIONS =~# '--color=always' if $GREP_OPTIONS =~# '--color=always'