diff options
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/reline.rb b/lib/reline.rb index f7678074de..f5c0f5ef69 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -260,7 +260,10 @@ module Reline result = key_stroke.match_status(buffer) case result when :matched - block.(key_stroke.expand(buffer).map{ |c| Reline::Key.new(c, c, false) }) + expanded = key_stroke.expand(buffer).map{ |expanded_c| + Reline::Key.new(expanded_c, expanded_c, false) + } + block.(expanded) break when :matching if buffer.size == 1 @@ -289,7 +292,10 @@ module Reline if buffer.size == 1 and c == "\e".ord read_escaped_key(keyseq_timeout, c, block) else - block.(buffer.map{ |c| Reline::Key.new(c, c, false) }) + expanded = buffer.map{ |expanded_c| + Reline::Key.new(expanded_c, expanded_c, false) + } + block.(expanded) end break end |