ruby-changes:59366
From: Nobuyoshi <ko1@a...>
Date: Sun, 22 Dec 2019 11:47:05 +0900 (JST)
Subject: [ruby-changes:59366] efd4a11ada (master): Support multibyte input
https://git.ruby-lang.org/ruby.git/commit/?id=efd4a11ada From efd4a11ada731ce18f5eb1500c76f77b4d0f313f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 22 Dec 2019 11:46:09 +0900 Subject: Support multibyte input diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index 4862cfb..6246a27 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -30,7 +30,8 @@ class Reline::ANSI https://github.com/ruby/ruby/blob/trunk/lib/reline/ansi.rb#L30 unless @@buf.empty? return @@buf.shift end - @@input.getbyte + c = @@input.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/