summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/windows.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index efde9d1b38..477152e436 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -90,6 +90,12 @@ class Reline::Windows
end
until @@kbhit.call == 0
ret = @@getwch.call
+ if ret == 0 or ret == 0xE0
+ @@input_buf << ret
+ ret = @@getwch.call
+ @@input_buf << ret
+ return @@input_buf.shift
+ end
begin
bytes = ret.chr(Encoding::UTF_8).encode(Encoding.default_external).bytes
@@input_buf.push(*bytes)