From 0d455a7af787176864612cde69a72f1a07cfc35a Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Wed, 19 Oct 2016 14:17:03 +0100 Subject: [PATCH] Only restore shell if previously saved. --- autoload/gitgutter/utility.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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