aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-02-13 21:25:25 +0100
committerDuncaen <mail@duncano.de>2017-02-16 01:09:35 +0100
commit0212c8cf299aaf3b4a7f74bc3861d555365feb36 (patch)
treef742acfcf2d173fc0fc899424bbfc7893b5bfa66
parent06d7e464a61da1250da58870d25fe94a6f8c8378 (diff)
downloaddotfiles-0212c8cf299aaf3b4a7f74bc3861d555365feb36.tar.gz
vim: update plug.vim
-rw-r--r--vim/autoload/plug.vim17
1 files changed, 14 insertions, 3 deletions
diff --git a/vim/autoload/plug.vim b/vim/autoload/plug.vim
index f7564ea..2a61349 100644
--- a/vim/autoload/plug.vim
+++ b/vim/autoload/plug.vim
@@ -820,6 +820,10 @@ function! s:do(pull, force, todo)
let type = type(spec.do)
if type == s:TYPE.string
if spec.do[0] == ':'
+ if !get(s:loaded, name, 0)
+ let s:loaded[name] = 1
+ call s:reorg_rtp()
+ endif
call s:load_plugin(spec)
try
execute spec.do[1:]
@@ -1768,6 +1772,7 @@ function! s:update_ruby()
tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1
nthr = VIM::evaluate('s:update.threads').to_i
maxy = VIM::evaluate('winheight(".")').to_i
+ vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/
cd = iswin ? 'cd /d' : 'cd'
tot = VIM::evaluate('len(s:update.todo)') || 0
bar = ''
@@ -1857,11 +1862,17 @@ function! s:update_ruby()
main = Thread.current
threads = []
watcher = Thread.new {
- require 'io/console' # >= Ruby 1.9
- nil until IO.console.getch == 3.chr
+ if vim7
+ while VIM::evaluate('getchar(1)')
+ sleep 0.1
+ end
+ else
+ require 'io/console' # >= Ruby 1.9
+ nil until IO.console.getch == 3.chr
+ end
mtx.synchronize do
running = false
- threads.each { |t| t.raise Interrupt }
+ threads.each { |t| t.raise Interrupt } unless vim7
end
threads.each { |t| t.join rescue nil }
main.kill