mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
d07060c42a
commit
79652c5873
1 changed files with 5 additions and 1 deletions
|
@ -578,7 +578,11 @@ class Reline::LineEditor
|
||||||
@proc_scope.set_key(key)
|
@proc_scope.set_key(key)
|
||||||
dialog_render_info = @proc_scope.call
|
dialog_render_info = @proc_scope.call
|
||||||
if @trap_key
|
if @trap_key
|
||||||
if @trap_key.is_a?(Array)
|
if @trap_key.any?{ |i| i.is_a?(Array) } # multiple trap
|
||||||
|
@trap_key.each do |t|
|
||||||
|
@config.add_oneshot_key_binding(t, @name)
|
||||||
|
end
|
||||||
|
elsif @trap_key.is_a?(Array)
|
||||||
@config.add_oneshot_key_binding(@trap_key, @name)
|
@config.add_oneshot_key_binding(@trap_key, @name)
|
||||||
elsif @trap_key.is_a?(Integer) or @trap_key.is_a?(Reline::Key)
|
elsif @trap_key.is_a?(Integer) or @trap_key.is_a?(Reline::Key)
|
||||||
@config.add_oneshot_key_binding([@trap_key], @name)
|
@config.add_oneshot_key_binding([@trap_key], @name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue