Only restore shell if previously saved.

This commit is contained in:
Andy Stewart
2016-10-19 14:17:03 +01:00
parent a693c0d326
commit 0d455a7af7

View File

@@ -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