mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-10 04:23:46 -05:00
Ensure nested calls do not overwrite value of original shell.
See #379.
This commit is contained in:
@@ -190,12 +190,14 @@ endfunction
|
||||
|
||||
function! gitgutter#utility#use_known_shell() abort
|
||||
if has('unix')
|
||||
let s:shell = &shell
|
||||
let s:shellcmdflag = &shellcmdflag
|
||||
let s:shellredir = &shellredir
|
||||
let &shell = 'sh'
|
||||
set shellcmdflag=-c
|
||||
set shellredir=>%s\ 2>&1
|
||||
if &shell !=# 'sh'
|
||||
let s:shell = &shell
|
||||
let s:shellcmdflag = &shellcmdflag
|
||||
let s:shellredir = &shellredir
|
||||
let &shell = 'sh'
|
||||
set shellcmdflag=-c
|
||||
set shellredir=>%s\ 2>&1
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user