[前][次][番号順一覧][スレッド一覧]

ruby-changes:57688

From: Nobuyoshi <ko1@a...>
Date: Tue, 10 Sep 2019 00:57:36 +0900 (JST)
Subject: [ruby-changes:57688] 6d9e54816f (master): Support multibyte input

https://git.ruby-lang.org/ruby.git/commit/?id=6d9e54816f

From 6d9e54816f828983bcf383ce6fce287bd3ca05b9 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 8 Sep 2019 22:34:01 +0900
Subject: Support multibyte input


diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index 2eca2b0..92d4522 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -26,7 +26,8 @@ class Reline::ANSI https://github.com/ruby/ruby/blob/trunk/lib/reline/ansi.rb#L26
     unless @@buf.empty?
       return @@buf.shift
     end
-    @@input.raw(&:getbyte)
+    c = @@input.raw(&:getbyte)
+    (c == 0x16 && @@input.raw(min: 0, tim: 0, &:getbyte)) || c
   end
 
   def self.ungetc(c)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]