ruby-changes:67570
From: aycabta <ko1@a...>
Date: Fri, 3 Sep 2021 04:28:03 +0900 (JST)
Subject: [ruby-changes:67570] 057ab5f056 (master): [ruby/reline] Emulate Unix like terminals that sends Alt+key as \e+key
https://git.ruby-lang.org/ruby.git/commit/?id=057ab5f056 From 057ab5f056bb310e324a48ca0aed2ee5231bcbd2 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Fri, 3 Sep 2021 03:30:36 +0900 Subject: [ruby/reline] Emulate Unix like terminals that sends Alt+key as \e+key https://github.com/ruby/reline/commit/dc2cf90fa6 --- lib/reline/windows.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb index b3443aa..642f33a 100644 --- a/lib/reline/windows.rb +++ b/lib/reline/windows.rb @@ -226,6 +226,8 @@ class Reline::Windows https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L226 # no char, only control keys return if key.char_code == 0 and key.control_keys.any? + @@output_buf.push("\e".ord) if key.control_keys.include?(:ALT) + @@output_buf.concat(key.char.bytes) end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/