From 816fc98ff27fc91bba2c750d4d91b6b7ebba3f63 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 22 Feb 2018 11:09:05 +0000 Subject: [PATCH] Swap order of if/else so it reads better. --- plugin/gitgutter.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/gitgutter.vim b/plugin/gitgutter.vim index ecd75d8..6db3dff 100644 --- a/plugin/gitgutter.vim +++ b/plugin/gitgutter.vim @@ -64,15 +64,15 @@ endif let default_grep = 'grep' call s:set('g:gitgutter_grep', default_grep) if !empty(g:gitgutter_grep) - if !executable(g:gitgutter_grep) + if executable(g:gitgutter_grep) + if $GREP_OPTIONS =~# '--color=always' + let g:gitgutter_grep .= ' --color=never' + endif + else 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' - let g:gitgutter_grep .= ' --color=never' - endif endif endif