Support multibyte input

This commit is contained in:
Nobuyoshi Nakada 2019-09-08 22:34:01 +09:00 committed by aycabta
parent 685f12bbca
commit 6d9e54816f

View File

@ -26,7 +26,8 @@ class Reline::ANSI
unless @@buf.empty? unless @@buf.empty?
return @@buf.shift return @@buf.shift
end end
@@input.raw(&:getbyte) c = @@input.raw(&:getbyte)
(c == 0x16 && @@input.raw(min: 0, tim: 0, &:getbyte)) || c
end end
def self.ungetc(c) def self.ungetc(c)