فهرست منبع

Fix Ruby installer on Vim 8.0.0036 (#538)

This could be a bug of Vim, but the new method should be safer in the
long run though it doesn't work on Ruby 1.8.
Junegunn Choi 10 سال پیش
والد
کامیت
c66e264d41
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      plug.vim

+ 2 - 3
plug.vim

@@ -1796,9 +1796,8 @@ function! s:update_ruby()
   main = Thread.current
   threads = []
   watcher = Thread.new {
-    while VIM::evaluate('getchar(1)')
-      sleep 0.1
-    end
+    require 'io/console' # >= Ruby 1.9
+    nil until IO.console.getch == 3.chr
     mtx.synchronize do
       running = false
       threads.each { |t| t.raise Interrupt }