Correct capitalization of complete_and_search

This commit is contained in:
ridiculousfish 2019-06-16 14:38:27 -07:00
parent fcf0593dfb
commit 5b5887ea99
3 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ static const input_function_metadata_t input_function_metadata[] = {
{readline_cmd_t::yank, L"yank"},
{readline_cmd_t::yank_POP, L"yank-pop"},
{readline_cmd_t::complete, L"complete"},
{readline_cmd_t::complete_AND_SEARCH, L"complete-and-search"},
{readline_cmd_t::complete_and_search, L"complete-and-search"},
{readline_cmd_t::pager_toggle_search, L"pager-toggle-search"},
{readline_cmd_t::beginning_of_history, L"beginning-of-history"},
{readline_cmd_t::end_of_history, L"end-of-history"},

View File

@ -25,7 +25,7 @@ enum class readline_cmd_t {
yank,
yank_POP,
complete,
complete_AND_SEARCH,
complete_and_search,
pager_toggle_search,
beginning_of_history,
end_of_history,

View File

@ -1015,7 +1015,7 @@ static bool command_ends_paging(readline_cmd_t c, bool focused_on_search_field)
return true;
}
case rl::complete:
case rl::complete_AND_SEARCH:
case rl::complete_and_search:
case rl::backward_char:
case rl::forward_char:
case rl::up_line:
@ -2490,7 +2490,7 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
break;
}
case rl::complete:
case rl::complete_AND_SEARCH: {
case rl::complete_and_search: {
if (!complete_func) break;
// Use the command line only; it doesn't make sense to complete in any other line.
@ -2562,11 +2562,11 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
cycle_command_line = el->text;
cycle_cursor_pos = el->position;
bool cont_after_prefix_insertion = (c == rl::complete_AND_SEARCH);
bool cont_after_prefix_insertion = (c == rl::complete_and_search);
rls.comp_empty = handle_completions(rls.comp, cont_after_prefix_insertion);
// Show the search field if requested and if we printed a list of completions.
if (c == rl::complete_AND_SEARCH && !rls.comp_empty && !pager.empty()) {
if (c == rl::complete_and_search && !rls.comp_empty && !pager.empty()) {
pager.set_search_field_shown(true);
select_completion_in_direction(selection_motion_t::next);
reader_repaint_needed();