Skip to content

Commit

Permalink
Do not insert ESC and unassigned ESC+key to input buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Mar 20, 2023
1 parent 96ce156 commit ed9a5cc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1570,13 +1570,7 @@ def wrap_method_call(method_symbol, method_obj, key, with_operator = false)
else # single byte
return if key.char >= 128 # maybe, first byte of multi byte
method_symbol = @config.editing_mode.get_method(key.combined_char)
if key.with_meta and method_symbol == :ed_unassigned
# split ESC + key
method_symbol = @config.editing_mode.get_method("\e".ord)
process_key("\e".ord, method_symbol)
method_symbol = @config.editing_mode.get_method(key.char)
process_key(key.char, method_symbol)
else
unless key.with_meta and method_symbol == :ed_unassigned
process_key(key.combined_char, method_symbol)
end
@multibyte_buffer.clear
Expand Down Expand Up @@ -3345,4 +3339,7 @@ def finish
@mark_pointer = new_pointer
end
alias_method :exchange_point_and_mark, :em_exchange_mark

private def em_meta_next(key)
end
end

0 comments on commit ed9a5cc

Please sign in to comment.