mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 11:01:14 -03:00
Normal text input to disable paging instead of search
Prior to this fix, if the user typed normal characters while the completion pager was shown, it would begin searching. This feature was not well liked, so we are going to instead just append the characters as normal and disable paging. Control-S can be used to toggle the search field. Fixes #2249
This commit is contained in:
@@ -3195,15 +3195,10 @@ const wchar_t *reader_readline(int nchars) {
|
||||
// Other, if a normal character, we add it to the command.
|
||||
if (!fish_reserved_codepoint(c) && (c >= L' ' || c == L'\n' || c == L'\r') &&
|
||||
c != 0x7F) {
|
||||
bool allow_expand_abbreviations = false;
|
||||
if (data->is_navigating_pager_contents()) {
|
||||
data->pager.set_search_field_shown(true);
|
||||
} else {
|
||||
allow_expand_abbreviations = true;
|
||||
}
|
||||
|
||||
// Regular character.
|
||||
editable_line_t *el = data->active_edit_line();
|
||||
bool allow_expand_abbreviations = (el == &data->command_line);
|
||||
insert_char(data->active_edit_line(), c, allow_expand_abbreviations);
|
||||
|
||||
// End paging upon inserting into the normal command line.
|
||||
|
||||
Reference in New Issue
Block a user