aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-06-02 08:50:01 +0900
committeraycabta <aycabta@gmail.com>2019-06-02 08:50:01 +0900
commit486a2c26d604ff0e18bae73fe97b95478a44f3d5 (patch)
treee7cd306d89417127ddfa137d63beff129e034a50 /lib/reline.rb
parente360688c4df08c2a43daa00c1de9832a20ad1521 (diff)
downloadruby-486a2c26d604ff0e18bae73fe97b95478a44f3d5.tar.gz
Add Reline test for unknown macro
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 2b21968371..cafaf578a0 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -304,7 +304,6 @@ module Reline
$stderr.reopen(ENV['RELINE_STDERR_TTY'], 'w')
$stderr.sync = true
end
- @@config.read
otio = Reline::IOGate.prep
may_req_ambiguous_char_width
@@ -324,9 +323,12 @@ module Reline
@@line_editor.pre_input_hook = @@pre_input_hook
@@line_editor.rerender
- @@config.reset_default_key_bindings
- Reline::IOGate::RAW_KEYSTROKE_CONFIG.each_pair do |key, func|
- @@config.add_default_key_binding(key, func)
+ unless @@config.test_mode
+ @@config.read
+ @@config.reset_default_key_bindings
+ Reline::IOGate::RAW_KEYSTROKE_CONFIG.each_pair do |key, func|
+ @@config.add_default_key_binding(key, func)
+ end
end
key_stroke = Reline::KeyStroke.new(@@config)