From 1fd627ebd358f3c19d5e5b44d461e38180c9dffb Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 24 May 2019 19:02:53 +0200 Subject: [PATCH] reader: Don't handle escape specially Escape is just another ordinary character that you can bind, or not. --- src/reader.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index eff0bcd6b..4d663b5ac 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -3278,16 +3278,8 @@ maybe_t reader_data_t::readline(int nchars_or_0) { } else { // Ordinary char. wchar_t c = event_needing_handling->get_char(); - if (c == L'\x1B') { - // Escape was pressed. - if (history_search.active()) { - history_search.go_to_end(); - update_command_line_from_history_search(); - history_search.reset(); - } - assert(!history_search.active()); - } else if (!fish_reserved_codepoint(c) && (c >= L' ' || c == L'\n' || c == L'\r') && - c != 0x7F) { + if (!fish_reserved_codepoint(c) && (c >= L' ' || c == L'\n' || c == L'\r') && + c != 0x7F) { // Regular character. editable_line_t *el = active_edit_line(); insert_char(active_edit_line(), c);