Workaround for screen freeze in MacVim GUI (#36)
This commit is contained in:
parent
e4671eaf9e
commit
9132e9d50d
1 changed files with 10 additions and 0 deletions
10
plug.vim
10
plug.vim
|
@ -705,6 +705,15 @@ function! s:update_parallel(pull, todo, threads)
|
||||||
threads.each { |t| t.join rescue nil }
|
threads.each { |t| t.join rescue nil }
|
||||||
main.kill
|
main.kill
|
||||||
}
|
}
|
||||||
|
refresh = Thread.new {
|
||||||
|
while true
|
||||||
|
mtx.synchronize do
|
||||||
|
break unless running
|
||||||
|
VIM::command('normal! a')
|
||||||
|
end
|
||||||
|
sleep 0.2
|
||||||
|
end
|
||||||
|
} if VIM::evaluate('has("mac") && has("gui_running")') == 1
|
||||||
|
|
||||||
processed = Set.new
|
processed = Set.new
|
||||||
progress = iswin ? '' : '--progress'
|
progress = iswin ? '' : '--progress'
|
||||||
|
@ -762,6 +771,7 @@ function! s:update_parallel(pull, todo, threads)
|
||||||
all.merge!(extended)
|
all.merge!(extended)
|
||||||
logh.call
|
logh.call
|
||||||
end
|
end
|
||||||
|
refresh.kill if refresh
|
||||||
watcher.kill
|
watcher.kill
|
||||||
$curbuf[1] = "Updated. Elapsed time: #{"%.6f" % (Time.now - st)} sec."
|
$curbuf[1] = "Updated. Elapsed time: #{"%.6f" % (Time.now - st)} sec."
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue