diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb index 4862cfb13f..6246a27107 100644 --- a/lib/reline/ansi.rb +++ b/lib/reline/ansi.rb @@ -30,7 +30,8 @@ class Reline::ANSI 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)