Temporarily disable &imd on GUI MacVim (#36)

This commit is contained in:
Junegunn Choi 2014-07-21 11:35:48 +09:00
parent 9132e9d50d
commit 279a334c8b

View File

@ -58,6 +58,7 @@ set cpo&vim
let s:plug_source = 'https://raw.github.com/junegunn/vim-plug/master/plug.vim' let s:plug_source = 'https://raw.github.com/junegunn/vim-plug/master/plug.vim'
let s:plug_file = 'Plugfile' let s:plug_file = 'Plugfile'
let s:plug_buf = -1 let s:plug_buf = -1
let s:mac_gui = has('mac') && has('gui_running')
let s:is_win = has('win32') || has('win64') let s:is_win = has('win32') || has('win64')
let s:me = expand('<sfile>:p') let s:me = expand('<sfile>:p')
@ -474,6 +475,10 @@ function! s:update_impl(pull, args) abort
let len = len(g:plugs) let len = len(g:plugs)
if has('ruby') && threads > 1 if has('ruby') && threads > 1
try try
let imd = &imd
if s:mac_gui
set noimd
endif
call s:update_parallel(a:pull, todo, threads) call s:update_parallel(a:pull, todo, threads)
catch catch
let lines = getline(4, '$') let lines = getline(4, '$')
@ -487,6 +492,8 @@ function! s:update_impl(pull, args) abort
endif endif
endfor endfor
echoerr v:exception echoerr v:exception
finally
let &imd = imd
endtry endtry
else else
call s:update_serial(a:pull, todo) call s:update_serial(a:pull, todo)
@ -713,7 +720,7 @@ function! s:update_parallel(pull, todo, threads)
end end
sleep 0.2 sleep 0.2
end end
} if VIM::evaluate('has("mac") && has("gui_running")') == 1 } if VIM::evaluate('s:mac_gui') == 1
processed = Set.new processed = Set.new
progress = iswin ? '' : '--progress' progress = iswin ? '' : '--progress'