fish-shell/src
Johannes Altmanninger 5678602af4 Stop special input functions "and" & "or" from tearing up multi-char binding
The tentative binding for the upcoming "history-pager-delete" is

    bind -k sdc history-pager-delete or backward-delete-char

When Shift+Delete is pressed while the history pager is active,
"history-pager-delete" succeeds. In this case, the "or" needs to kick the
"backward-delete-char" out of the input queue.
After doing so, it continues reading, but interprets the input as
single-char binding. This breaks when the next key emits a multi-char sequence,
like the arrow keys.

Fix this by reading a full sequence, which means we need to run "read_char()"
instead of "read_ch()" (confusing, right?).

I'm still working on writing a test. Somehow this only reproduces in the
history pager where Shift+Delete followed by down arrow emits "[B" (since
we swallowed the leading escape char).  Confusingly, it doesn't do that in
the commandline or the completion search field.
2023-07-04 18:42:11 +02:00
..
builtins Remove C++ code 2023-07-01 15:33:01 -07:00
widecharwidth Upgrade widechar_width to Unicode 15 2022-09-26 17:17:17 +02:00
abbrs.h abbr: port abbreviation and abbr builtin to rust 2023-02-25 12:24:58 +01:00
ast.cpp Port AST to Rust 2023-04-16 17:46:56 +02:00
ast.h Port AST to Rust 2023-04-16 17:46:56 +02:00
autoload.cpp clang-format C++ files 2023-04-19 22:43:36 +02:00
autoload.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
builtin.cpp Remove C++ code 2023-07-01 15:33:01 -07:00
builtin.h Port builtins/status to fish 2023-07-01 15:33:01 -07:00
callback.h Add and use type-erased RAII callback wrapper for ffi 2023-04-29 11:02:59 -05:00
color.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
color.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
common.cpp Port debug_thread_error() to Rust 2023-06-17 12:14:42 -07:00
common.h Integrate threads.rs w/ legacy C++ code 2023-04-29 11:02:59 -05:00
complete.cpp complete: fix condition to suppress variable autocompletion 2023-04-25 21:47:11 -07:00
complete.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
enum_map.h enum_map stuff to enum_map.h 2021-10-01 03:39:43 -07:00
enum_set.h Remove enum_iter_t 2023-01-14 12:58:20 -08:00
env.cpp Expose Rust EnvStack from parser_t 2023-06-19 13:45:54 -07:00
env.h Expose Rust EnvStack from parser_t 2023-06-19 13:45:54 -07:00
env_universal_common.cpp Implement (but do not yet adopt) Environment in Rust 2023-05-07 15:15:56 -07:00
env_universal_common.h Implement (but do not yet adopt) Environment in Rust 2023-05-07 15:15:56 -07:00
event.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
event.h Reimplement environment and the environment stack in Rust 2023-05-07 15:15:56 -07:00
exec.cpp Port builtins/argparse to Rust 2023-06-19 13:45:54 -07:00
exec.h Port builtins/argparse to Rust 2023-06-19 13:45:54 -07:00
expand.cpp Integrate threads.rs w/ legacy C++ code 2023-04-29 11:02:59 -05:00
expand.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
fallback.cpp Use Rust version of global fallback variables 2023-05-25 16:54:07 -05:00
fallback.h Use Rust version of global fallback variables 2023-05-25 16:54:07 -05:00
fds.cpp New wcs2zstring to explicitly convert to zero-terminated strings 2023-04-02 15:17:06 +02:00
fds.h Port fd_monitor (and its needed components) 2023-02-19 15:42:03 -06:00
ffi.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
ffi_baggage.h Port AST to Rust 2023-04-16 17:46:56 +02:00
fish.cpp Actually report ASAN memory leaks 2023-05-02 11:52:41 -05:00
fish_indent.cpp Rewrite and adopt print_help in Rust 2023-06-01 23:17:13 +08:00
fish_indent_common.cpp Port AST to Rust 2023-04-16 17:46:56 +02:00
fish_indent_common.h Port AST to Rust 2023-04-16 17:46:56 +02:00
fish_key_reader.cpp Rewrite and adopt print_help in Rust 2023-06-01 23:17:13 +08:00
fish_test_helper.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
fish_tests.cpp Port builtin_test tests to Rust 2023-05-21 11:50:24 -07:00
fish_version.cpp Fix build 2021-09-21 18:33:14 -07:00
fish_version.h Revert "Generate FISH_BUILD_VERSION info for cmake builds" 2018-01-08 22:28:10 -08:00
flog.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
flog.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
function.cpp Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
function.h clang-format C++ files 2023-04-19 22:43:36 +02:00
future_feature_flags.h Follow Rust naming convention for some types 2023-02-08 21:49:54 +01:00
global_safety.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
highlight.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
highlight.h clang-format C++ files 2023-04-19 22:43:36 +02:00
history.cpp Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
history.h Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
history_file.cpp history_file.cpp: remove an unused variable 2022-10-26 16:09:02 +02:00
history_file.h clang-format all C++ files 2022-08-21 15:02:19 -07:00
input.cpp Stop special input functions "and" & "or" from tearing up multi-char binding 2023-07-04 18:42:11 +02:00
input.h clang-format C++ files 2023-04-19 22:43:36 +02:00
input_common.cpp Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
input_common.h Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
io.cpp Port builtin_test tests to Rust 2023-05-21 11:50:24 -07:00
io.h Port builtin_test tests to Rust 2023-05-21 11:50:24 -07:00
iothread.h Add and use type-erased RAII callback wrapper for ffi 2023-04-29 11:02:59 -05:00
kill.cpp Port killring 2023-06-04 12:18:19 -07:00
kill.h Port killring 2023-06-04 12:18:19 -07:00
lru.h Reimplement autosuggestion-triggered completion loading 2022-06-19 15:15:17 -07:00
maybe.h Replace maybe_t::missing_or_empty with a more Rust-friendly helper 2023-04-21 13:57:29 +02:00
null_terminated_array.cpp Reimplement owning_null_terminated_array in Rust 2023-05-07 15:15:56 -07:00
null_terminated_array.h Reimplement owning_null_terminated_array in Rust 2023-05-07 15:15:56 -07:00
operation_context.cpp clang-format all C++ files 2022-08-21 15:02:19 -07:00
operation_context.h Port job_group to rust (#9608) 2023-02-25 16:42:45 -06:00
output.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
output.h Adopt the new output.rs 2023-06-17 12:14:42 -07:00
pager.cpp Redraw pager on new selection when nothing was selected previously 2023-06-04 13:40:30 -07:00
pager.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
parse_constants.h Don't leak ParseErrorList FFI crutch type into Rust 2023-04-19 01:03:16 +02:00
parse_execution.cpp Rename kw() to keyword() also in C++ 2023-04-19 22:43:36 +02:00
parse_execution.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
parse_tree.h Port AST to Rust 2023-04-16 17:46:56 +02:00
parse_util.cpp Rename kw() to keyword() also in C++ 2023-04-19 22:43:36 +02:00
parse_util.h Port parse_util_compute_indents 2023-04-19 10:35:22 +02:00
parser.cpp Port builtins/status to fish 2023-07-01 15:33:01 -07:00
parser.h Port builtins/status to fish 2023-07-01 15:33:01 -07:00
parser_keywords.cpp IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
parser_keywords.h Remove unused functions, members (and a variable) 2022-04-09 10:10:44 -07:00
path.cpp path: drop path_get_paths_ffi 2023-06-30 10:05:01 +08:00
path.h path: drop path_get_paths_ffi 2023-06-30 10:05:01 +08:00
postfork.cpp Port job_group to rust (#9608) 2023-02-25 16:42:45 -06:00
postfork.h Mark Dup2List as a struct, not a class 2023-02-11 12:13:51 -08:00
proc.cpp Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
proc.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
re.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
re.h Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
reader.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
reader.h Port env_dispatch to Rust and integrate with C++ code 2023-05-25 16:54:07 -05:00
redirection.h redirection.rs: don't leak FFI type into Rust code 2023-04-16 17:21:54 +02:00
rustffi.cpp Initial Rust commit 2023-02-02 19:34:47 -07:00
screen.cpp Adopt the new output.rs 2023-06-17 12:14:42 -07:00
screen.h Adopt the new output.rs 2023-06-17 12:14:42 -07:00
signals.cpp Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
signals.h Adopt the new Rust signal implementation 2023-04-30 16:22:57 -07:00
termsize.h Adopt the new termsize 2023-03-19 16:13:41 -07:00
tokenizer.h Port tokenizer.cpp to Rust 2023-02-09 00:37:22 +01:00
topic_monitor.h Initial Rust commit 2023-02-02 19:34:47 -07:00
utf8.cpp Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
utf8.h Revert "Re-implement macro to constexpr transition" 2022-09-20 11:58:37 -07:00
util.h Port util.cpp to Rust 2023-02-03 18:55:06 +01:00
wait_handle.h Rewrite wait handles and wait handle store in Rust 2023-03-18 18:53:04 -07:00
wcstringutil.cpp clang-format C++ files 2023-04-19 22:43:36 +02:00
wcstringutil.h clang-format C++ files 2023-04-19 22:43:36 +02:00
wgetopt.cpp Use actual enum names in wgetopt 2022-12-11 10:26:39 -08:00
wgetopt.h Untangle some pointers in wgetopt 2022-12-04 14:48:20 -08:00
wildcard.cpp Port common.{h,cpp} to Rust 2023-04-02 15:17:06 +02:00
wildcard.h IWYU-guided #include rejiggering. 2022-08-20 23:55:18 -07:00
wutil.cpp Delete wcstring_list_t 2023-04-19 01:03:16 +02:00
wutil.h Make C++ env_var_t wrap Rust EnvVar 2023-05-07 15:15:56 -07:00