-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore unhandled escape sequences #522
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1571,11 +1571,13 @@ def wrap_method_call(method_symbol, method_obj, key, with_operator = false) | |
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) | ||
if @config.editing_mode_is?(:vi_command, :vi_insert) | ||
# split ESC + key in vi mode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only used in vi mode. |
||
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) | ||
end | ||
else | ||
process_key(key.combined_char, method_symbol) | ||
end | ||
|
@@ -3345,4 +3347,7 @@ def finish | |
@mark_pointer = new_pointer | ||
end | ||
alias_method :exchange_point_and_mark, :em_exchange_mark | ||
|
||
private def em_meta_next(key) | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In method |
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F1, F2, F3, F4 key in macOS
["\eOP", "\eOQ", "\eOR", "\eOS"]
There are many other type of escape sequence, but I think it's CSI and SS3 is enough for keyboard input sequence. some other sequence ends with
"\a"
or "\e\\
" (example:"\e]0;NewWindowTitle\e\\"
) but if we implement it and user mistakenly input ESC+], irb looks hanging up.