diff options
| author | aycabta <aycabta@gmail.com> | 2019-06-02 08:50:01 +0900 |
|---|---|---|
| committer | aycabta <aycabta@gmail.com> | 2019-06-02 08:50:01 +0900 |
| commit | 486a2c26d604ff0e18bae73fe97b95478a44f3d5 (patch) | |
| tree | e7cd306d89417127ddfa137d63beff129e034a50 /lib | |
| parent | e360688c4df08c2a43daa00c1de9832a20ad1521 (diff) | |
Add Reline test for unknown macro
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/reline.rb | 10 | ||||
| -rw-r--r-- | lib/reline/config.rb | 1 |
2 files changed, 6 insertions, 5 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) diff --git a/lib/reline/config.rb b/lib/reline/config.rb index 7639882027..b5ed6a89ba 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -78,7 +78,6 @@ class Reline::Config end def read(file = DEFAULT_PATH) - return if @test_mode file = ENV['INPUTRC'] if ENV['INPUTRC'] begin if file.respond_to?(:readlines) |
