Restore $GIT_TERMINAL_PROMPT in s:update_finish

Fix for asynchronous installer of Neovim
This commit is contained in:
Junegunn Choi 2015-02-15 21:24:33 +09:00
parent 925ec7b325
commit 4a96db8971

View file

@ -719,7 +719,7 @@ function! s:update_impl(pull, force, args) abort
endif
if !s:is_win && s:git_version_requirement(2, 3)
let git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : ''
let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : ''
let $GIT_TERMINAL_PROMPT = 0
for plug in values(todo)
let plug.uri = substitute(plug.uri,
@ -783,13 +783,12 @@ function! s:update_impl(pull, force, args) abort
else
call s:update_vim()
endif
if exists('git_terminal_prompt')
let $GIT_TERMINAL_PROMPT = git_terminal_prompt
endif
endfunction
function! s:update_finish()
if exists('s:git_terminal_prompt')
let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt
endif
if s:switch_in()
call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'has_key(v:val, "do")'))
call s:finish(s:update.pull)