diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index 9e13a8b..77ad2dc 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -203,8 +203,10 @@ endfunction function! gitgutter#utility#restore_shell() abort if has('unix') - let &shell = s:shell - let &shellcmdflag = s:shellcmdflag - let &shellredir = s:shellredir + if exists('s:shell') + let &shell = s:shell + let &shellcmdflag = s:shellcmdflag + let &shellredir = s:shellredir + endif endif endfunction