Skip to content

Commit

Permalink
Support multibyte input
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and aycabta committed Sep 9, 2019
1 parent 685f12b commit 6d9e548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reline/ansi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def self.getc
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)
Expand Down

0 comments on commit 6d9e548

Please sign in to comment.