diff options
author | aycabta <aycabta@gmail.com> | 2021-09-03 03:29:10 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-03 04:27:48 +0900 |
commit | 9e0caba187746acb03449ea5b08334cd6b68ea0a (patch) | |
tree | a1237293e82ab90c8a816b3d17fbc78d0d167beb /lib/reline/line_editor.rb | |
parent | 38ae3b8e36a6bdb39a8fa743789525ad764e064d (diff) | |
download | ruby-9e0caba187746acb03449ea5b08334cd6b68ea0a.tar.gz |
[ruby/reline] Add Reline::Key#match?
https://github.com/ruby/reline/commit/8f6aa3af2e
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 50aeac996f..d3020087bf 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1480,7 +1480,9 @@ class Reline::LineEditor @last_key = key @dialogs.each do |dialog| # The dialog will intercept the key if trap_key is set. - return if dialog.trap_key and key.combined_char == dialog.trap_key + if dialog.trap_key and dialog.trap_key.match?(key) + return + end end @just_cursor_moving = nil if key.char.nil? |