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:
ridiculousfish
2018-01-30 09:49:46 -08:00
parent c4a12f90c1
commit 5c2e6734c1
2 changed files with 2 additions and 6 deletions

View File

@@ -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.